diff options
author | kzc <kzc@users.noreply.github.com> | 2020-02-15 15:22:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-15 20:22:33 +0000 |
commit | fbfa6178a6081e03c3edcbec706b2c6e103f9ba7 (patch) | |
tree | dd969fa4eaddf5be41a42dfdb6cd854c1d3bba87 /test/input/reduce | |
parent | 5315dd95b0402b656d07660b705b27a0404183d4 (diff) | |
download | tracifyjs-fbfa6178a6081e03c3edcbec706b2c6e103f9ba7.tar.gz tracifyjs-fbfa6178a6081e03c3edcbec706b2c6e103f9ba7.zip |
improve `--reduce-test` (#3722)
- hoist body of functions and IIFEs
- simplify var declarations
Diffstat (limited to 'test/input/reduce')
-rw-r--r-- | test/input/reduce/unsafe_math.reduced.js | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/test/input/reduce/unsafe_math.reduced.js b/test/input/reduce/unsafe_math.reduced.js index ac2f1890..13460423 100644 --- a/test/input/reduce/unsafe_math.reduced.js +++ b/test/input/reduce/unsafe_math.reduced.js @@ -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 |