aboutsummaryrefslogtreecommitdiff
path: root/test/input/reduce
diff options
context:
space:
mode:
authorkzc <kzc@users.noreply.github.com>2020-02-15 15:22:33 -0500
committerGitHub <noreply@github.com>2020-02-15 20:22:33 +0000
commitfbfa6178a6081e03c3edcbec706b2c6e103f9ba7 (patch)
treedd969fa4eaddf5be41a42dfdb6cd854c1d3bba87 /test/input/reduce
parent5315dd95b0402b656d07660b705b27a0404183d4 (diff)
downloadtracifyjs-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.js11
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