Implemented Value interface
This commit is contained in:
parent
fbcadae268
commit
9cfca57111
36 changed files with 194 additions and 153 deletions
|
@ -20,8 +20,8 @@ func (f *Function) CompileDelete(root *expression.Expression) error {
|
|||
defer f.UseVariable(variable)
|
||||
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], variable.Type.(*types.Pointer).To.Size())
|
||||
f.RegisterRegister(asm.MOVE, f.CPU.Input[0], variable.Value.Register)
|
||||
f.RegisterNumber(asm.MOVE, f.CPU.Input[1], variable.Value.Typ.(*types.Pointer).To.Size())
|
||||
f.CallSafe(f.All.Functions["mem.free"], f.CPU.Input[:2])
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue