Improved Windows ABI support

This commit is contained in:
2025-02-15 18:23:33 +01:00
parent 0a1a8f741d
commit d0bcd8cf9f
22 changed files with 124 additions and 32 deletions

View File

@ -12,7 +12,12 @@ import (
func (f *Function) CompileMemoryStore(root *expression.Expression) error {
parameters := root.Children[1:]
name := parameters[0].Token.Text(f.File.Bytes)
numBytes, _ := f.Number(parameters[1].Token)
numBytes, err := f.ToNumber(parameters[1].Token)
if err != nil {
return err
}
value := parameters[2]
variable := f.VariableByName(name)
@ -28,6 +33,6 @@ func (f *Function) CompileMemoryStore(root *expression.Expression) error {
Length: byte(numBytes),
}
_, err := f.ExpressionToMemory(value, memory)
_, err = f.ExpressionToMemory(value, memory)
return err
}