Rewrite temporary variable elimination

This commit is contained in:
Alexey Andreev
2016-03-23 11:54:58 +03:00
parent 8709289b0a
commit cfdce8eaca
11 changed files with 642 additions and 144 deletions
@@ -0,0 +1,24 @@
function foo() {
throw "foo";
}
function bar() {
var $tmp = foo();
try {
return "result: " + $tmp;
} catch (e) {
return "error";
}
}
function box() {
try {
bar()
} catch (e) {
if (e == "foo") {
return "OK"
}
return e;
}
return "Exception expected";
}