diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-18 13:06:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-18 13:06:23 -0700 |
commit | a9808ac6982e88262fc652d0634bf17119e1ee5f (patch) | |
tree | d37487959c6a407f92bbb112a0cea79b1eb2633e /test/wasm2js/tee_local.2asm.js | |
parent | 8dc68bc96db046127d648644daa89f524a668863 (diff) | |
download | binaryen-a9808ac6982e88262fc652d0634bf17119e1ee5f.tar.gz binaryen-a9808ac6982e88262fc652d0634bf17119e1ee5f.tar.bz2 binaryen-a9808ac6982e88262fc652d0634bf17119e1ee5f.zip |
wasm2js: do not try to be smart with not emitting if braces, the corner cases are tricky (#2026)
leave them for later optimizers/minifiers
Diffstat (limited to 'test/wasm2js/tee_local.2asm.js')
-rw-r--r-- | test/wasm2js/tee_local.2asm.js | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/wasm2js/tee_local.2asm.js b/test/wasm2js/tee_local.2asm.js index 0538cbd95..c01df10b1 100644 --- a/test/wasm2js/tee_local.2asm.js +++ b/test/wasm2js/tee_local.2asm.js @@ -104,9 +104,17 @@ function asmFunc(global, env, buffer) { i64toi32_i32$1 = $7_1; i64toi32_i32$3 = $16 + (+$1_1 + ($2_1 + (+($3_1 >>> 0) + (+($4_1 | 0) + (+$5_1 + ($27 + (+(i64toi32_i32$1 >>> 0) + 4294967296.0 * +(i64toi32_i32$0 >>> 0) + $8_1))))))); if (Math_abs(i64toi32_i32$3) >= 1.0) { - if (i64toi32_i32$3 > 0.0) $17 = ~~Math_min(Math_floor(i64toi32_i32$3 / 4294967296.0), 4294967296.0 - 1.0) >>> 0; else $17 = ~~Math_ceil((i64toi32_i32$3 - +(~~i64toi32_i32$3 >>> 0 >>> 0)) / 4294967296.0) >>> 0; - $18 = $17; - } else $18 = 0; + { + if (i64toi32_i32$3 > 0.0) { + $17 = ~~Math_min(Math_floor(i64toi32_i32$3 / 4294967296.0), 4294967296.0 - 1.0) >>> 0 + } else { + $17 = ~~Math_ceil((i64toi32_i32$3 - +(~~i64toi32_i32$3 >>> 0 >>> 0)) / 4294967296.0) >>> 0 + } + $18 = $17; + } + } else { + $18 = 0 + } i64toi32_i32$0 = $18; i64toi32_i32$1 = ~~i64toi32_i32$3 >>> 0; i64toi32_i32$HIGH_BITS = i64toi32_i32$0; |