Last active
April 25, 2018 18:56
-
-
Save schmee/3bb6b0dc95073ab5eadb1cc6dcd0f24a to your computer and use it in GitHub Desktop.
Graal escape analysis test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function add(a, b) { | |
c = new(); | |
c.x = a.x + b.x; | |
c.y = a.y + b.y; | |
return c; | |
} | |
function main() { | |
a = new(); | |
a.x = 1; | |
a.y = 2; | |
b = new(); | |
b.x = 2; | |
b.y = 4; | |
i = 0; | |
while (i < 100000000) { | |
a = add(a, add(a,b)); | |
i = i + 1; | |
} | |
println(a.x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment