Replaced builtin store function with a new syntax
This commit is contained in:
@ -56,6 +56,13 @@ func (f *Function) CompileAssign(node *ast.Assign) error {
|
||||
return err
|
||||
}
|
||||
|
||||
leftSize := leftValue.Memory.Length
|
||||
rightSize := uint8(rightValue.Type().Size())
|
||||
|
||||
if rightSize != 0 && leftSize != rightSize {
|
||||
panic("memory store length mismatch")
|
||||
}
|
||||
|
||||
f.ValueToMemory(rightValue, leftValue.Memory)
|
||||
return nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user