Fixed register allocation on function calls
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user