diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-24 10:22:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-24 10:22:56 -0700 |
commit | f81c78bd62548a1eabc27adfbcbdc44cefb320cf (patch) | |
tree | 34db3cb4614640334342e11f3a24321e16422aff /test/wasm2js/labels.2asm.js | |
parent | 5d3fcffdd9f9d9de10a0ce60d1e0163693c007c3 (diff) | |
download | binaryen-f81c78bd62548a1eabc27adfbcbdc44cefb320cf.tar.gz binaryen-f81c78bd62548a1eabc27adfbcbdc44cefb320cf.tar.bz2 binaryen-f81c78bd62548a1eabc27adfbcbdc44cefb320cf.zip |
wasm2js: start to optionally optimize the JS (#2046)
Removes redundant | 0s and similar things. (Apparently closure compiler doesn't do that, so makes sense to do here.)
Diffstat (limited to 'test/wasm2js/labels.2asm.js')
-rw-r--r-- | test/wasm2js/labels.2asm.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/wasm2js/labels.2asm.js b/test/wasm2js/labels.2asm.js index 3c9618588..1e384a69d 100644 --- a/test/wasm2js/labels.2asm.js +++ b/test/wasm2js/labels.2asm.js @@ -111,7 +111,7 @@ function asmFunc(global, env, buffer) { function $5() { var $0_1 = 0; $0_1 = 1; - return $0_1 + 1 | 0 | 0; + return $0_1 + 1 | 0; } function $6() { @@ -228,24 +228,24 @@ function asmFunc(global, env, buffer) { if (0) { break inner } - i = i | 1 | 0; + i = i | 1; if (1) { break inner } - i = i | 2 | 0; + i = i | 2; } - i = i | 4 | 0; + i = i | 4; $10_1 = i; if (0) { break outer } - i = i | 8 | 0; - i = i | 16 | 0; + i = i | 8; + i = i | 16; $10_1 = i; if (1) { break outer } - i = i | 32 | 0; + i = i | 32; $10_1 = i; } return $10_1 | 0; @@ -324,7 +324,7 @@ function asmFunc(global, env, buffer) { $2_2 = 3; break l113; } - return $1_2 + $2_2 | 0 | 0; + return $1_2 + $2_2 | 0; } var FUNCTION_TABLE = []; |