diff options
author | Alon Zakai <alonzakai@gmail.com> | 2019-04-19 15:22:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-19 15:22:55 -0700 |
commit | db14d0477f2715e3071687f42b77d8712477d83e (patch) | |
tree | 7cb4f679bfc18cbb7d4a87db0b3d5a02f6bcaeed /test/wasm2js/f32_cmp.2asm.js | |
parent | a4baf2152d11c28964025759d2702fe7c48d321e (diff) | |
download | binaryen-db14d0477f2715e3071687f42b77d8712477d83e.tar.gz binaryen-db14d0477f2715e3071687f42b77d8712477d83e.tar.bz2 binaryen-db14d0477f2715e3071687f42b77d8712477d83e.zip |
wasm2js2 import fixes (#2031)
* Don't assume function types exist in legalize-js-interface.
* Properly handle (ignore) imports in RemoveNonJSOps - do not try to recurse into them.
* Run legalize-js-interface and remove-unused-module-elements in wasm2js, the first is necessary, the last is nice to have.
Diffstat (limited to 'test/wasm2js/f32_cmp.2asm.js')
-rw-r--r-- | test/wasm2js/f32_cmp.2asm.js | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/test/wasm2js/f32_cmp.2asm.js b/test/wasm2js/f32_cmp.2asm.js index 23f6d43a1..fc1293caf 100644 --- a/test/wasm2js/f32_cmp.2asm.js +++ b/test/wasm2js/f32_cmp.2asm.js @@ -21,7 +21,6 @@ function asmFunc(global, env, buffer) { var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; - var i64toi32_i32$HIGH_BITS = 0; function $0(x, y) { x = Math_fround(x); y = Math_fround(y); @@ -58,14 +57,50 @@ function asmFunc(global, env, buffer) { return x >= y | 0; } + function legalstub$0($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $0(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + + function legalstub$1($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $1(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + + function legalstub$2($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $2(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + + function legalstub$3($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $3(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + + function legalstub$4($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $4(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + + function legalstub$5($0_1, $1_1) { + $0_1 = +$0_1; + $1_1 = +$1_1; + return $5(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1))) | 0 | 0; + } + var FUNCTION_TABLE = []; return { - eq: $0, - ne: $1, - lt: $2, - le: $3, - gt: $4, - ge: $5 + eq: legalstub$0, + ne: legalstub$1, + lt: legalstub$2, + le: legalstub$3, + gt: legalstub$4, + ge: legalstub$5 }; } |