diff options
author | Alon Zakai <azakai@google.com> | 2019-05-01 10:43:01 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-01 10:43:01 -0700 |
commit | 73709b4da08d285c2237c8c23a54ba53274c0c7f (patch) | |
tree | 2f428e5367c511b22391a8c471edbc0e7ed0688a /test/wasm2js/i32.2asm.js | |
parent | ac93469d7fde75397403db94d9bf0c1bac0cf60f (diff) | |
download | binaryen-73709b4da08d285c2237c8c23a54ba53274c0c7f.tar.gz binaryen-73709b4da08d285c2237c8c23a54ba53274c0c7f.tar.bz2 binaryen-73709b4da08d285c2237c8c23a54ba53274c0c7f.zip |
wasm2js: run more optimizations (#2073)
In particular, coalesce-locals is useful even if closure is run later (apparently it finds stuff closure can't).
Diffstat (limited to 'test/wasm2js/i32.2asm.js')
-rw-r--r-- | test/wasm2js/i32.2asm.js | 276 |
1 files changed, 138 insertions, 138 deletions
diff --git a/test/wasm2js/i32.2asm.js b/test/wasm2js/i32.2asm.js index f049b6b4e..166612dc2 100644 --- a/test/wasm2js/i32.2asm.js +++ b/test/wasm2js/i32.2asm.js @@ -21,217 +21,217 @@ function asmFunc(global, env, buffer) { var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; - function $0(x, y) { - x = x | 0; - y = y | 0; - return x + y | 0 | 0; + function $0($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 + $1_1 | 0 | 0; } - function $1(x, y) { - x = x | 0; - y = y | 0; - return x - y | 0 | 0; + function $1($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 - $1_1 | 0 | 0; } - function $2(x, y) { - x = x | 0; - y = y | 0; - return Math_imul(x, y) | 0; + function $2($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return Math_imul($0_1, $1_1) | 0; } - function $3(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) / (y | 0) | 0 | 0; + function $3($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) / ($1_1 | 0) | 0 | 0; } - function $4(x, y) { - x = x | 0; - y = y | 0; - return (x >>> 0) / (y >>> 0) | 0 | 0; + function $4($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 >>> 0) / ($1_1 >>> 0) | 0 | 0; } - function $5(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) % (y | 0) | 0 | 0; + function $5($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) % ($1_1 | 0) | 0 | 0; } - function $6(x, y) { - x = x | 0; - y = y | 0; - return (x >>> 0) % (y >>> 0) | 0 | 0; + function $6($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 >>> 0) % ($1_1 >>> 0) | 0 | 0; } - function $7(x, y) { - x = x | 0; - y = y | 0; - return x & y | 0 | 0; + function $7($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 & $1_1 | 0 | 0; } - function $8(x, y) { - x = x | 0; - y = y | 0; - return x | y | 0 | 0; + function $8($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 | $1_1 | 0 | 0; } - function $9(x, y) { - x = x | 0; - y = y | 0; - return x ^ y | 0 | 0; + function $9($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 ^ $1_1 | 0 | 0; } - function $10(x, y) { - x = x | 0; - y = y | 0; - return x << y | 0 | 0; + function $10($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 << $1_1 | 0 | 0; } - function $11(x, y) { - x = x | 0; - y = y | 0; - return x >> y | 0 | 0; + function $11($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >> $1_1 | 0 | 0; } - function $12(x, y) { - x = x | 0; - y = y | 0; - return x >>> y | 0 | 0; + function $12($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >>> $1_1 | 0 | 0; } - function $13(x, y) { - x = x | 0; - y = y | 0; - return __wasm_rotl_i32(x | 0, y | 0) | 0 | 0; + function $13($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return __wasm_rotl_i32($0_1 | 0, $1_1 | 0) | 0 | 0; } - function $14(x, y) { - x = x | 0; - y = y | 0; - return __wasm_rotr_i32(x | 0, y | 0) | 0 | 0; + function $14($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return __wasm_rotr_i32($0_1 | 0, $1_1 | 0) | 0 | 0; } - function $15(x) { - x = x | 0; - return Math_clz32(x) | 0; + function $15($0_1) { + $0_1 = $0_1 | 0; + return Math_clz32($0_1) | 0; } - function $16(x) { - x = x | 0; - return __wasm_ctz_i32(x | 0) | 0 | 0; + function $16($0_1) { + $0_1 = $0_1 | 0; + return __wasm_ctz_i32($0_1 | 0) | 0 | 0; } - function $17(x) { - x = x | 0; - return __wasm_popcnt_i32(x | 0) | 0 | 0; + function $17($0_1) { + $0_1 = $0_1 | 0; + return __wasm_popcnt_i32($0_1 | 0) | 0 | 0; } - function $18(x) { - x = x | 0; - return !x | 0; + function $18($0_1) { + $0_1 = $0_1 | 0; + return !$0_1 | 0; } - function $19(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) == (y | 0) | 0; + function $19($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) == ($1_1 | 0) | 0; } - function $20(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) != (y | 0) | 0; + function $20($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) != ($1_1 | 0) | 0; } - function $21(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) < (y | 0) | 0; + function $21($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) < ($1_1 | 0) | 0; } - function $22(x, y) { - x = x | 0; - y = y | 0; - return x >>> 0 < y >>> 0 | 0; + function $22($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >>> 0 < $1_1 >>> 0 | 0; } - function $23(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) <= (y | 0) | 0; + function $23($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) <= ($1_1 | 0) | 0; } - function $24(x, y) { - x = x | 0; - y = y | 0; - return x >>> 0 <= y >>> 0 | 0; + function $24($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >>> 0 <= $1_1 >>> 0 | 0; } - function $25(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) > (y | 0) | 0; + function $25($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) > ($1_1 | 0) | 0; } - function $26(x, y) { - x = x | 0; - y = y | 0; - return x >>> 0 > y >>> 0 | 0; + function $26($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >>> 0 > $1_1 >>> 0 | 0; } - function $27(x, y) { - x = x | 0; - y = y | 0; - return (x | 0) >= (y | 0) | 0; + function $27($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return ($0_1 | 0) >= ($1_1 | 0) | 0; } - function $28(x, y) { - x = x | 0; - y = y | 0; - return x >>> 0 >= y >>> 0 | 0; + function $28($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + return $0_1 >>> 0 >= $1_1 >>> 0 | 0; } - function __wasm_ctz_i32(var$0) { - var$0 = var$0 | 0; - if (var$0) { - return 31 - Math_clz32((var$0 + -1 | 0) ^ var$0 | 0) | 0 | 0 + function __wasm_ctz_i32($0_1) { + $0_1 = $0_1 | 0; + if ($0_1) { + return 31 - Math_clz32(($0_1 + -1 | 0) ^ $0_1 | 0) | 0 | 0 } return 32 | 0; } - function __wasm_popcnt_i32(var$0) { - var$0 = var$0 | 0; - var var$1 = 0, $5_1 = 0; + function __wasm_popcnt_i32($0_1) { + $0_1 = $0_1 | 0; + var $1_1 = 0, $2_1 = 0; label$1 : { label$2 : while (1) { - $5_1 = var$1; - if (!var$0) { + $2_1 = $1_1; + if (!$0_1) { break label$1 } - var$0 = var$0 & (var$0 - 1 | 0) | 0; - var$1 = var$1 + 1 | 0; + $0_1 = $0_1 & ($0_1 - 1 | 0) | 0; + $1_1 = $1_1 + 1 | 0; continue label$2; }; } - return $5_1 | 0; + return $2_1 | 0; } - function __wasm_rotl_i32(var$0, var$1) { - var$0 = var$0 | 0; - var$1 = var$1 | 0; - var var$2 = 0; - var$2 = var$1 & 31 | 0; - var$1 = (0 - var$1 | 0) & 31 | 0; - return ((-1 >>> var$2 | 0) & var$0 | 0) << var$2 | 0 | (((-1 << var$1 | 0) & var$0 | 0) >>> var$1 | 0) | 0 | 0; + function __wasm_rotl_i32($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + var $2_1 = 0; + $2_1 = $1_1 & 31 | 0; + $1_1 = (0 - $1_1 | 0) & 31 | 0; + return ((-1 >>> $2_1 | 0) & $0_1 | 0) << $2_1 | 0 | (((-1 << $1_1 | 0) & $0_1 | 0) >>> $1_1 | 0) | 0 | 0; } - function __wasm_rotr_i32(var$0, var$1) { - var$0 = var$0 | 0; - var$1 = var$1 | 0; - var var$2 = 0; - var$2 = var$1 & 31 | 0; - var$1 = (0 - var$1 | 0) & 31 | 0; - return ((-1 << var$2 | 0) & var$0 | 0) >>> var$2 | 0 | (((-1 >>> var$1 | 0) & var$0 | 0) << var$1 | 0) | 0 | 0; + function __wasm_rotr_i32($0_1, $1_1) { + $0_1 = $0_1 | 0; + $1_1 = $1_1 | 0; + var $2_1 = 0; + $2_1 = $1_1 & 31 | 0; + $1_1 = (0 - $1_1 | 0) & 31 | 0; + return ((-1 << $2_1 | 0) & $0_1 | 0) >>> $2_1 | 0 | (((-1 >>> $1_1 | 0) & $0_1 | 0) << $1_1 | 0) | 0 | 0; } var FUNCTION_TABLE = []; |