Fixed register allocation on function calls

This commit is contained in:
Eduard Urbach 2025-02-05 22:49:39 +01:00
parent f76f0a1e4b
commit 64bd2bae59
Signed by: eduard
GPG key ID: 49226B848C78F6C8
5 changed files with 40 additions and 67 deletions

View file

@ -7,15 +7,15 @@ struct Point {
}
main() {
p := construct()
p := construct(1, 2)
print(p)
delete(p)
}
construct() -> *Point {
construct(x Int, y Int) -> *Point {
p := new(Point)
p.x = 1
p.y = 2
p.x = x
p.y = y
return p
}