diff options
author | Alon Zakai <azakai@google.com> | 2019-05-02 16:40:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-02 16:40:20 -0700 |
commit | 80b509cfb8fa35d229643f35e423e6d049ab8849 (patch) | |
tree | bb978cf9ab6293876b38fd1eb476126fe34f8b5b /test/wasm2js/i64-rotate.2asm.js.opt | |
parent | 29e7e4483dc04ca8e882f12871c7eb395c82de00 (diff) | |
download | binaryen-80b509cfb8fa35d229643f35e423e6d049ab8849.tar.gz binaryen-80b509cfb8fa35d229643f35e423e6d049ab8849.tar.bz2 binaryen-80b509cfb8fa35d229643f35e423e6d049ab8849.zip |
wasm2js: don't emit obviously unnecessary parens (#2080)
A minifier would probably remove them later anyhow, but they make reading the code annoying and hard.
Diffstat (limited to 'test/wasm2js/i64-rotate.2asm.js.opt')
-rw-r--r-- | test/wasm2js/i64-rotate.2asm.js.opt | 90 |
1 files changed, 30 insertions, 60 deletions
diff --git a/test/wasm2js/i64-rotate.2asm.js.opt b/test/wasm2js/i64-rotate.2asm.js.opt index fd5eca90a..4cb85a846 100644 --- a/test/wasm2js/i64-rotate.2asm.js.opt +++ b/test/wasm2js/i64-rotate.2asm.js.opt @@ -38,53 +38,39 @@ function asmFunc(global, env, buffer) { if (32 >>> 0 <= $5 >>> 0) { $3 = -1 >>> $3 } else { - { - $4 = -1 >>> $3; - $3 = (1 << $3) - 1 << 32 - $3 | -1 >>> $3; - } + $4 = -1 >>> $3; + $3 = (1 << $3) - 1 << 32 - $3 | -1 >>> $3; } $5 = $3 & $0; $3 = $1 & $4; $4 = $6 & 31; if (32 >>> 0 <= $6 >>> 0) { - { - $3 = $5 << $4; - $6 = 0; - } + $3 = $5 << $4; + $6 = 0; } else { - { - $3 = (1 << $4) - 1 & $5 >>> 32 - $4 | $3 << $4; - $6 = $5 << $4; - } + $3 = (1 << $4) - 1 & $5 >>> 32 - $4 | $3 << $4; + $6 = $5 << $4; } $5 = $3; $4 = 0 - $2 & 63; $3 = $4; $2 = $3 & 31; if (32 >>> 0 <= ($3 & 63) >>> 0) { - { - $3 = -1 << $2; - $2 = 0; - } + $3 = -1 << $2; + $2 = 0; } else { - { - $3 = (1 << $2) - 1 & -1 >>> 32 - $2 | -1 << $2; - $2 = -1 << $2; - } + $3 = (1 << $2) - 1 & -1 >>> 32 - $2 | -1 << $2; + $2 = -1 << $2; } $0 = $2 & $0; $3 = $1 & $3; $1 = $4 & 31; if (32 >>> 0 <= $4 >>> 0) { - { - $2 = 0; - $0 = $3 >>> $1; - } + $2 = 0; + $0 = $3 >>> $1; } else { - { - $2 = $3 >>> $1; - $0 = ((1 << $1) - 1 & $3) << 32 - $1 | $0 >>> $1; - } + $2 = $3 >>> $1; + $0 = ((1 << $1) - 1 & $3) << 32 - $1 | $0 >>> $1; } $0 = $0 | $6; i64toi32_i32$HIGH_BITS = $2 | $5; @@ -96,57 +82,41 @@ function asmFunc(global, env, buffer) { $6 = $2 & 63; $3 = $6 & 31; if (32 >>> 0 <= $6 >>> 0) { - { - $4 = -1 << $3; - $7 = 0; - } + $4 = -1 << $3; + $7 = 0; } else { - { - $4 = (1 << $3) - 1 & -1 >>> 32 - $3 | -1 << $3; - $7 = -1 << $3; - } + $4 = (1 << $3) - 1 & -1 >>> 32 - $3 | -1 << $3; + $7 = -1 << $3; } $7 = $7 & $0; $3 = $1 & $4; $5 = $6 & 31; if (32 >>> 0 <= $6 >>> 0) { - { - $4 = 0; - $6 = $3 >>> $5; - } + $4 = 0; + $6 = $3 >>> $5; } else { - { - $4 = $3 >>> $5; - $6 = ((1 << $5) - 1 & $3) << 32 - $5 | $7 >>> $5; - } + $4 = $3 >>> $5; + $6 = ((1 << $5) - 1 & $3) << 32 - $5 | $7 >>> $5; } $7 = $4; $3 = 0 - $2 & 63; $5 = $3 & 31; if (32 >>> 0 <= ($3 & 63) >>> 0) { - { - $4 = 0; - $2 = -1 >>> $5; - } + $4 = 0; + $2 = -1 >>> $5; } else { - { - $4 = -1 >>> $5; - $2 = (1 << $5) - 1 << 32 - $5 | -1 >>> $5; - } + $4 = -1 >>> $5; + $2 = (1 << $5) - 1 << 32 - $5 | -1 >>> $5; } $0 = $2 & $0; $1 = $1 & $4; $4 = $3 & 31; if (32 >>> 0 <= $3 >>> 0) { - { - $2 = $0 << $4; - $0 = 0; - } + $2 = $0 << $4; + $0 = 0; } else { - { - $2 = (1 << $4) - 1 & $0 >>> 32 - $4 | $1 << $4; - $0 = $0 << $4; - } + $2 = (1 << $4) - 1 & $0 >>> 32 - $4 | $1 << $4; + $0 = $0 << $4; } $0 = $0 | $6; i64toi32_i32$HIGH_BITS = $2 | $7; |