Fixed register allocation on function calls
This commit is contained in:
parent
f76f0a1e4b
commit
64bd2bae59
5 changed files with 40 additions and 67 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue