summaryrefslogtreecommitdiff
path: root/test/wasm2js/float_misc.2asm.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-04-19 15:22:55 -0700
committerGitHub <noreply@github.com>2019-04-19 15:22:55 -0700
commitdb14d0477f2715e3071687f42b77d8712477d83e (patch)
tree7cb4f679bfc18cbb7d4a87db0b3d5a02f6bcaeed /test/wasm2js/float_misc.2asm.js
parenta4baf2152d11c28964025759d2702fe7c48d321e (diff)
downloadbinaryen-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/float_misc.2asm.js')
-rw-r--r--test/wasm2js/float_misc.2asm.js106
1 files changed, 91 insertions, 15 deletions
diff --git a/test/wasm2js/float_misc.2asm.js b/test/wasm2js/float_misc.2asm.js
index 8f41bb2f6..ad9c34c39 100644
--- a/test/wasm2js/float_misc.2asm.js
+++ b/test/wasm2js/float_misc.2asm.js
@@ -23,7 +23,6 @@ function asmFunc(global, env, buffer) {
var nan = global.NaN;
var infinity = global.Infinity;
var __tempMemory__ = env.__tempMemory__ | 0;
- var i64toi32_i32$HIGH_BITS = 0;
function $0(x, y) {
x = Math_fround(x);
y = Math_fround(y);
@@ -210,6 +209,83 @@ function asmFunc(global, env, buffer) {
return +Math_max(x, y);
}
+ function legalstub$0($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($0(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$1($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($1(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$2($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($2(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$3($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($3(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$4($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($4(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$5($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($5(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$6($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($6(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$7($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($7(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$8($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($8(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$9($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($9(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$10($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($10(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$11($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($11(Math_fround(Math_fround($0_1)))));
+ }
+
+ function legalstub$12($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($12(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$13($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($13(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
function __wasm_nearest_f32(var$0) {
var$0 = Math_fround(var$0);
var var$1 = Math_fround(0), var$2 = Math_fround(0), wasm2js_f32$0 = Math_fround(0), wasm2js_f32$1 = Math_fround(0), wasm2js_i32$0 = 0;
@@ -260,20 +336,20 @@ function asmFunc(global, env, buffer) {
var FUNCTION_TABLE = [];
return {
- f32_add: $0,
- f32_sub: $1,
- f32_mul: $2,
- f32_div: $3,
- f32_sqrt: $4,
- f32_abs: $5,
- f32_neg: $6,
- f32_copysign: $7,
- f32_ceil: $8,
- f32_floor: $9,
- f32_trunc: $10,
- f32_nearest: $11,
- f32_min: $12,
- f32_max: $13,
+ f32_add: legalstub$0,
+ f32_sub: legalstub$1,
+ f32_mul: legalstub$2,
+ f32_div: legalstub$3,
+ f32_sqrt: legalstub$4,
+ f32_abs: legalstub$5,
+ f32_neg: legalstub$6,
+ f32_copysign: legalstub$7,
+ f32_ceil: legalstub$8,
+ f32_floor: legalstub$9,
+ f32_trunc: legalstub$10,
+ f32_nearest: legalstub$11,
+ f32_min: legalstub$12,
+ f32_max: legalstub$13,
f64_add: $14,
f64_sub: $15,
f64_mul: $16,