Skip to content

Instantly share code, notes, and snippets.

@apg
Created December 7, 2011 15:54
Show Gist options
  • Save apg/1443297 to your computer and use it in GitHub Desktop.
Save apg/1443297 to your computer and use it in GitHub Desktop.
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