diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2018-02-12 23:28:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-12 23:28:28 +0800 |
commit | 0809699bdc7b1c249c7bbe02924a4a861aff8bea (patch) | |
tree | cf442345213f3c85a659ae84db6f82575c3ba2e8 /test/compress/reduce_vars.js | |
parent | 2088e1c19d97955b5582e08396fca8c7b7dadd83 (diff) | |
download | tracifyjs-0809699bdc7b1c249c7bbe02924a4a861aff8bea.tar.gz tracifyjs-0809699bdc7b1c249c7bbe02924a4a861aff8bea.zip |
simplify `do-while` into `for` (#2907)
fixes #2904
Diffstat (limited to 'test/compress/reduce_vars.js')
-rw-r--r-- | test/compress/reduce_vars.js | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/compress/reduce_vars.js b/test/compress/reduce_vars.js index c0148204..f916e54b 100644 --- a/test/compress/reduce_vars.js +++ b/test/compress/reduce_vars.js @@ -1178,9 +1178,7 @@ toplevel_on_loops_1: { console.log("bar:", --x); } var x = 3; - do - bar(); - while (x); + for (;bar(), x;); } expect_stdout: true } @@ -1208,9 +1206,7 @@ toplevel_off_loops_1: { console.log("bar:", --x); } var x = 3; - do - bar(); - while (x); + for (;bar(), x;); } expect_stdout: true } @@ -1265,9 +1261,7 @@ toplevel_off_loops_2: { console.log("bar:"); } var x = 3; - do - bar(); - while (x); + for (;bar(), x;); } } |