Fixed register allocation on function calls

This commit is contained in:
2025-02-05 22:49:39 +01:00
parent 5d38a4980a
commit 12894dbcc5
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
}