Implemented calls using memory addresses
This commit is contained in:
@ -75,10 +75,7 @@ func (f *Function) CompileCall(root *expression.Expression) ([]types.Type, error
|
||||
f.Register(asm.CALL, value.Register)
|
||||
|
||||
case *eval.Memory:
|
||||
tmp := f.NewRegister()
|
||||
f.MemoryRegister(asm.LOAD, value.Memory, tmp)
|
||||
f.Register(asm.CALL, tmp)
|
||||
f.FreeRegister(tmp)
|
||||
f.Memory(asm.CALL, value.Memory)
|
||||
}
|
||||
|
||||
return nil, nil
|
||||
|
Reference in New Issue
Block a user