Implemented calls using memory addresses

This commit is contained in:
Eduard Urbach 2025-03-03 00:53:41 +01:00
parent 225d78e2d8
commit acfa6de1d4
Signed by: eduard
GPG key ID: 49226B848C78F6C8
8 changed files with 114 additions and 10 deletions

View file

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