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/tee_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/tee_local.2asm.js')
-rw-r--r-- | test/wasm2js/tee_local.2asm.js | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/test/wasm2js/tee_local.2asm.js b/test/wasm2js/tee_local.2asm.js index 5ef3aee68..39c9424a0 100644 --- a/test/wasm2js/tee_local.2asm.js +++ b/test/wasm2js/tee_local.2asm.js @@ -151,16 +151,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); @@ -183,16 +183,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; @@ -200,24 +200,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); @@ -245,16 +245,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; @@ -262,8 +262,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) { @@ -281,16 +281,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; $16 = 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; - $16 = 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; + $16 = i64toi32_i32$2 << i64toi32_i32$4; } } $11$hi = i64toi32_i32$1; @@ -298,24 +298,24 @@ function asmFunc(global, env, buffer) { i64toi32_i32$0 = $8_1; i64toi32_i32$2 = $11$hi; i64toi32_i32$3 = $16; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - i64toi32_i32$2 = $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) | 0; + i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2; + i64toi32_i32$2 = $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) | 0; i64toi32_i32$0 = i64toi32_i32$HIGH_BITS; $6_1 = i64toi32_i32$2; $6$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; - $17 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; + $17 = i64toi32_i32$0 >>> i64toi32_i32$4; } } else { { - i64toi32_i32$2 = i64toi32_i32$0 >>> i64toi32_i32$4 | 0; - $17 = (((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; + $17 = ((1 << i64toi32_i32$4) - 1 & i64toi32_i32$0) << 32 - i64toi32_i32$4 | i64toi32_i32$1 >>> i64toi32_i32$4; } } setTempRet0($17 | 0); @@ -338,16 +338,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; @@ -355,8 +355,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 +(+$10(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 +(+$10(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 = []; |