Improved code quality

This commit is contained in:
Eduard Urbach 2025-02-20 16:55:17 +01:00
parent 5f7cc9115a
commit f6242bc7ec
Signed by: eduard
GPG key ID: 49226B848C78F6C8
12 changed files with 51 additions and 37 deletions

View file

@ -21,7 +21,7 @@ func (f *Function) CompileDelete(root *expression.Expression) error {
f.SaveRegister(f.CPU.Input[0])
f.SaveRegister(f.CPU.Input[1])
f.RegisterRegister(asm.MOVE, f.CPU.Input[0], variable.Register)
f.RegisterNumber(asm.MOVE, f.CPU.Input[1], int(variable.Type.(*types.Pointer).To.Size()))
f.RegisterNumber(asm.MOVE, f.CPU.Input[1], variable.Type.(*types.Pointer).To.Size())
f.CallSafe(f.Functions["mem.free"], f.CPU.Input[:2])
return nil
}