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/get_local.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/get_local.2asm.js')
-rw-r--r-- | test/wasm2js/get_local.2asm.js | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/test/wasm2js/get_local.2asm.js b/test/wasm2js/get_local.2asm.js index 2fa149f0e..6bb0c76b7 100644 --- a/test/wasm2js/get_local.2asm.js +++ b/test/wasm2js/get_local.2asm.js @@ -113,16 +113,16 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = i64toi32_i32$0; i64toi32_i32$0 = 0; i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { + i64toi32_i32$4 = i64toi32_i32$3 & 31; + if (32 >>> 0 <= (i64toi32_i32$3 & 63) >>> 0) { { i64toi32_i32$0 = 0; - $7_1 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; + $7_1 = i64toi32_i32$1 >>> i64toi32_i32$4; } } else { { - i64toi32_i32$0 = i64toi32_i32$1 >>> i64toi32_i32$4 | 0; - $7_1 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$1 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$2 >>> i64toi32_i32$4 | 0) | 0; + i64toi32_i32$0 = i64toi32_i32$1 >>> i64toi32_i32$4; + $7_1 = ((1 << i64toi32_i32$4) - 1 & i64toi32_i32$1) << 32 - i64toi32_i32$4 | i64toi32_i32$2 >>> i64toi32_i32$4; } } setTempRet0($7_1 | 0); @@ -145,16 +145,16 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $1_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { + i64toi32_i32$4 = i64toi32_i32$3 & 31; + if (32 >>> 0 <= (i64toi32_i32$3 & 63) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4; $12 = 0; } } else { { - i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; - $12 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = (1 << i64toi32_i32$4) - 1 & i64toi32_i32$2 >>> 32 - i64toi32_i32$4 | i64toi32_i32$0 << i64toi32_i32$4; + $12 = i64toi32_i32$2 << i64toi32_i32$4; } } $7$hi = i64toi32_i32$1; @@ -162,24 +162,24 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $4_1; i64toi32_i32$2 = $7$hi; i64toi32_i32$3 = $12; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - i64toi32_i32$2 = $5(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0) | 0; + i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2; + i64toi32_i32$2 = $5(i64toi32_i32$0 | i64toi32_i32$3, i64toi32_i32$2 | 0) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $2_1 = i64toi32_i32$2; $2$hi = i64toi32_i32$0; i64toi32_i32$1 = i64toi32_i32$2; i64toi32_i32$2 = 0; i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { + i64toi32_i32$4 = i64toi32_i32$3 & 31; + if (32 >>> 0 <= (i64toi32_i32$3 & 63) >>> 0) { { i64toi32_i32$2 = 0; - $13 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; + $13 = i64toi32_i32$0 >>> i64toi32_i32$4; } } else { { - i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; - $13 = (((1 << i64toi32_i32$4 | 0) - 1 | 0) & i64toi32_i32$0 | 0) << (32 - i64toi32_i32$4 | 0) | 0 | (i64toi32_i32$1 >>> i64toi32_i32$4 | 0) | 0; + i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4; + $13 = ((1 << i64toi32_i32$4) - 1 & i64toi32_i32$0) << 32 - i64toi32_i32$4 | i64toi32_i32$1 >>> i64toi32_i32$4; } } setTempRet0($13 | 0); @@ -207,16 +207,16 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $1_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { + i64toi32_i32$4 = i64toi32_i32$3 & 31; + if (32 >>> 0 <= (i64toi32_i32$3 & 63) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4; $14 = 0; } } else { { - i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; - $14 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = (1 << i64toi32_i32$4) - 1 & i64toi32_i32$2 >>> 32 - i64toi32_i32$4 | i64toi32_i32$0 << i64toi32_i32$4; + $14 = i64toi32_i32$2 << i64toi32_i32$4; } } $10$hi = i64toi32_i32$1; @@ -224,8 +224,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $7_1; i64toi32_i32$2 = $10$hi; i64toi32_i32$3 = $14; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - $8(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0, Math_fround(Math_fround($2_1)), +$3_1, $4_1 | 0, $5_1 | 0); + i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2; + $8(i64toi32_i32$0 | i64toi32_i32$3, i64toi32_i32$2 | 0, Math_fround(Math_fround($2_1)), +$3_1, $4_1 | 0, $5_1 | 0); } function legalstub$9($0_1, $1_1, $2_1, $3_1, $4_1, $5_1) { @@ -243,16 +243,16 @@ function asmFunc(global, env, buffer) { i64toi32_i32$2 = $1_1; i64toi32_i32$1 = 0; i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { + i64toi32_i32$4 = i64toi32_i32$3 & 31; + if (32 >>> 0 <= (i64toi32_i32$3 & 63) >>> 0) { { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4; $14 = 0; } } else { { - i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; - $14 = i64toi32_i32$2 << i64toi32_i32$4 | 0; + i64toi32_i32$1 = (1 << i64toi32_i32$4) - 1 & i64toi32_i32$2 >>> 32 - i64toi32_i32$4 | i64toi32_i32$0 << i64toi32_i32$4; + $14 = i64toi32_i32$2 << i64toi32_i32$4; } } $10$hi = i64toi32_i32$1; @@ -260,8 +260,8 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $7_1; i64toi32_i32$2 = $10$hi; i64toi32_i32$3 = $14; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - return +(+$9(i64toi32_i32$0 | i64toi32_i32$3 | 0 | 0, i64toi32_i32$2 | 0, Math_fround(Math_fround($2_1)), +$3_1, $4_1 | 0, $5_1 | 0)); + i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2; + return +(+$9(i64toi32_i32$0 | i64toi32_i32$3, i64toi32_i32$2 | 0, Math_fround(Math_fround($2_1)), +$3_1, $4_1 | 0, $5_1 | 0)); } var FUNCTION_TABLE = []; |