JS/Inlining: refactor TemporaryAssignmentElimination, add more tests

This commit is contained in:
Alexey Andreev
2016-05-26 12:21:43 +03:00
parent b8b6999afc
commit a26c09ae81
8 changed files with 356 additions and 34 deletions
@@ -0,0 +1,19 @@
function f(x) {
return x;
}
function box() {
var result1, result2;
if (f(true)) {
result1 = "1";
}
if (result1 !== "1") return "fail1: " + result1;
if (f(false)) {
result2 = "1";
}
if (result2 !== void 0) return "fail2: " + result2;
return "OK";
}