improve --reduce-test (#3722)

- hoist body of functions and IIFEs
- simplify var declarations
This commit is contained in:
kzc
2020-02-15 15:22:33 -05:00
committed by GitHub
parent 5315dd95b0
commit fbfa6178a6
2 changed files with 91 additions and 12 deletions

View File

@@ -1,13 +1,10 @@
var b = 0;
function f0() {
var expr2 = (0 - 1 - .1 - .1).toString();
for (var key2 in expr2) {
--b;
}
}
var expr2 = (0 - 1 - .1 - .1).toString();
var a_1 = f0();
for (var key2 in expr2) {
--b;
}
console.log(b);
// output: -19