Replaced builtin store function with a new syntax

This commit is contained in:
2025-04-11 14:21:51 +02:00
parent a9d783c675
commit 43a006e4af
12 changed files with 54 additions and 46 deletions

View File

@ -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
}