Created
December 7, 2011 15:54
-
-
Save apg/1443297 to your computer and use it in GitHub Desktop.
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
inline function foo(x, y) { | |
return x + y; | |
} | |
function bar(x, y) { | |
foo(1, 2); | |
return x * y; | |
} | |
// naively becomes => | |
function bar(x, y) { | |
x = 1; | |
y = 2; | |
x + y; | |
return x * y; | |
} | |
// but, in reality, you'd want | |
function bar(x, y) { | |
tmpx = 1; | |
tmpy = 2; | |
tmpx + tmpy; | |
return x * y; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment