summaryrefslogtreecommitdiff
path: root/test/wasm2js/f32.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/f32.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/f32.2asm.js')
-rw-r--r--test/wasm2js/f32.2asm.js106
1 files changed, 91 insertions, 15 deletions
diff --git a/test/wasm2js/f32.2asm.js b/test/wasm2js/f32.2asm.js
index adc88d36b..96d10e660 100644
--- a/test/wasm2js/f32.2asm.js
+++ b/test/wasm2js/f32.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);
@@ -99,6 +98,83 @@ function asmFunc(global, env, buffer) {
return Math_fround((HEAP32[0] = (HEAPF32[0] = x, HEAP32[0] | 0) & 2147483647 | 0 | ((HEAPF32[0] = y, HEAP32[0] | 0) & 2147483648 | 0) | 0, HEAPF32[0]));
}
+ 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, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($5(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$6($0_1, $1_1) {
+ $0_1 = +$0_1;
+ $1_1 = +$1_1;
+ return +(+Math_fround($6(Math_fround(Math_fround($0_1)), Math_fround(Math_fround($1_1)))));
+ }
+
+ function legalstub$7($0_1) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($7(Math_fround(Math_fround($0_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) {
+ $0_1 = +$0_1;
+ return +(+Math_fround($12(Math_fround(Math_fround($0_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;
@@ -125,20 +201,20 @@ function asmFunc(global, env, buffer) {
var FUNCTION_TABLE = [];
return {
- add: $0,
- sub: $1,
- mul: $2,
- div: $3,
- sqrt: $4,
- min: $5,
- max: $6,
- ceil: $7,
- floor: $8,
- trunc: $9,
- nearest: $10,
- abs: $11,
- neg: $12,
- copysign: $13
+ add: legalstub$0,
+ sub: legalstub$1,
+ mul: legalstub$2,
+ div: legalstub$3,
+ sqrt: legalstub$4,
+ min: legalstub$5,
+ max: legalstub$6,
+ ceil: legalstub$7,
+ floor: legalstub$8,
+ trunc: legalstub$9,
+ nearest: legalstub$10,
+ abs: legalstub$11,
+ neg: legalstub$12,
+ copysign: legalstub$13
};
}