diff --git a/.gitattributes b/.gitattributes index 174a3221..a98ee58a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,3 +1,4 @@ bin/* text eol=lf dist/* binary scripts/*.sh eol=lf +lib/binaryen.js binary diff --git a/examples/game-of-life/build/optimized.wasm b/examples/game-of-life/build/optimized.wasm index 12f1a666..d6ed14c3 100644 Binary files a/examples/game-of-life/build/optimized.wasm and b/examples/game-of-life/build/optimized.wasm differ diff --git a/examples/game-of-life/build/optimized.wat b/examples/game-of-life/build/optimized.wat index 1e9714ea..2faa816f 100644 --- a/examples/game-of-life/build/optimized.wat +++ b/examples/game-of-life/build/optimized.wat @@ -3,19 +3,22 @@ (type $F (func (result f64))) (type $v (func)) (type $iiFv (func (param i32 i32 f64))) + (import "env" "memory" (memory $0 0)) + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32)) (import "config" "BGR_DEAD" (global $assembly/config/BGR_DEAD i32)) (import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32)) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (import "env" "memory" (memory $0 0)) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (global $assembly/index/w (mut i32) (i32.const 0)) (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) - (func $assembly/index/init (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $assembly/index/init (; 1 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32) (local $2 i32) ;;@ assembly/index.ts:29:2 (set_global $assembly/index/w @@ -49,7 +52,7 @@ (get_global $assembly/index/h) ) ) - ;;@ assembly/index.ts:34:30 + ;;@ assembly/index.ts:35:4 (block $break|1 ;;@ assembly/index.ts:35:9 (set_local $1 @@ -70,7 +73,7 @@ (if (result i32) (f64.gt ;;@ assembly/index.ts:36:21 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ;;@ assembly/index.ts:36:32 (f64.const 0.1) ) @@ -131,7 +134,7 @@ ) ) ) - (func $assembly/index/step (; 2 ;) (type $v) + (func $assembly/index/step (; 2 ;) (; has Stack IR ;) (type $v) (local $0 i32) (local $1 i32) (local $2 i32) @@ -604,7 +607,7 @@ ) ) ) - (func $assembly/index/fill (; 3 ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) + (func $assembly/index/fill (; 3 ;) (; has Stack IR ;) (type $iiFv) (param $0 i32) (param $1 i32) (param $2 f64) (local $3 i32) ;;@ assembly/index.ts:81:2 (block $break|0 @@ -617,12 +620,12 @@ (get_global $assembly/index/w) ) ) - ;;@ assembly/index.ts:81:33 + ;;@ assembly/index.ts:82:4 (if ;;@ assembly/index.ts:82:8 (f64.lt ;;@ assembly/index.ts:82:13 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) (get_local $2) ) (i32.store @@ -673,12 +676,12 @@ (get_global $assembly/index/h) ) ) - ;;@ assembly/index.ts:84:33 + ;;@ assembly/index.ts:85:4 (if ;;@ assembly/index.ts:85:8 (f64.lt ;;@ assembly/index.ts:85:13 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) (get_local $2) ) ;;@ assembly/index.ts:17:2 @@ -720,4 +723,7 @@ ) ) ) + (func $null (; 4 ;) (; has Stack IR ;) (type $v) + (nop) + ) ) diff --git a/examples/game-of-life/build/untouched.wat b/examples/game-of-life/build/untouched.wat index 436ae074..be37ea55 100644 --- a/examples/game-of-life/build/untouched.wat +++ b/examples/game-of-life/build/untouched.wat @@ -3,16 +3,19 @@ (type $F (func (result f64))) (type $v (func)) (type $iiFv (func (param i32 i32 f64))) + (import "env" "memory" (memory $0 0)) + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "config" "BGR_ALIVE" (global $assembly/config/BGR_ALIVE i32)) (import "config" "BGR_DEAD" (global $assembly/config/BGR_DEAD i32)) (import "config" "BIT_ROT" (global $assembly/config/BIT_ROT i32)) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (import "env" "memory" (memory $0 0)) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) (global $assembly/index/w (mut i32) (i32.const 0)) (global $assembly/index/h (mut i32) (i32.const 0)) (global $assembly/index/s (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "fill" (func $assembly/index/fill)) @@ -57,7 +60,7 @@ ) ) ) - ;;@ assembly/index.ts:34:30 + ;;@ assembly/index.ts:35:4 (block $break|1 ;;@ assembly/index.ts:35:9 (set_local $3 @@ -75,14 +78,14 @@ ) ) ) - ;;@ assembly/index.ts:35:32 + ;;@ assembly/index.ts:36:6 (block $assembly/index/set|inlined.0 (set_local $4 ;;@ assembly/index.ts:36:16 (if (result i32) (f64.gt ;;@ assembly/index.ts:36:21 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ;;@ assembly/index.ts:36:32 (f64.const 0.1) ) @@ -751,12 +754,12 @@ ) ) ) - ;;@ assembly/index.ts:81:33 + ;;@ assembly/index.ts:82:4 (if ;;@ assembly/index.ts:82:8 (f64.lt ;;@ assembly/index.ts:82:13 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ;;@ assembly/index.ts:82:24 (get_local $2) ) @@ -817,12 +820,12 @@ ) ) ) - ;;@ assembly/index.ts:84:33 + ;;@ assembly/index.ts:85:4 (if ;;@ assembly/index.ts:85:8 (f64.lt ;;@ assembly/index.ts:85:13 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ;;@ assembly/index.ts:85:24 (get_local $2) ) @@ -874,4 +877,6 @@ ) ) ) + (func $null (; 4 ;) (type $v) + ) ) diff --git a/examples/game-of-life/index.html b/examples/game-of-life/index.html index ada9d5fb..a43b67dd 100644 --- a/examples/game-of-life/index.html +++ b/examples/game-of-life/index.html @@ -70,7 +70,7 @@ fetch("build/optimized.wasm") BGR_DEAD : rgb2bgr(RGB_DEAD) & ~1, // little endian, LSB must not be set BIT_ROT }, - JSMath: Math + Math })) .then(module => { var exports = module.instance.exports; diff --git a/examples/i64-polyfill/build/optimized.wat b/examples/i64-polyfill/build/optimized.wat index f69f9ce1..418428c7 100644 --- a/examples/i64-polyfill/build/optimized.wat +++ b/examples/i64-polyfill/build/optimized.wat @@ -2,10 +2,14 @@ (type $i (func (result i32))) (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) + (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $assembly/i64/lo (mut i32) (i32.const 0)) (global $assembly/i64/hi (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) @@ -37,15 +41,15 @@ (export "gt_u" (func $assembly/i64/gt_u)) (export "ge_s" (func $assembly/i64/ge_s)) (export "ge_u" (func $assembly/i64/ge_u)) - (func $assembly/i64/getLo (; 0 ;) (type $i) (result i32) + (func $assembly/i64/getLo (; 0 ;) (; has Stack IR ;) (type $i) (result i32) ;;@ assembly/i64.ts:4:9 (get_global $assembly/i64/lo) ) - (func $assembly/i64/getHi (; 1 ;) (type $i) (result i32) + (func $assembly/i64/getHi (; 1 ;) (; has Stack IR ;) (type $i) (result i32) ;;@ assembly/i64.ts:8:9 (get_global $assembly/i64/hi) ) - (func $assembly/i64/clz (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $assembly/i64/clz (; 2 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ assembly/i64.ts:15:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:15:7 @@ -75,7 +79,7 @@ (i32.const 0) ) ) - (func $assembly/i64/ctz (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $assembly/i64/ctz (; 3 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ assembly/i64.ts:23:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:23:7 @@ -105,7 +109,7 @@ (i32.const 0) ) ) - (func $assembly/i64/popcnt (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $assembly/i64/popcnt (; 4 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ assembly/i64.ts:31:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:31:7 @@ -135,7 +139,7 @@ (i32.const 0) ) ) - (func $assembly/i64/eqz (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32) + (func $assembly/i64/eqz (; 5 ;) (; has Stack IR ;) (type $iiv) (param $0 i32) (param $1 i32) ;;@ assembly/i64.ts:37:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:36:18 @@ -163,7 +167,7 @@ (i32.const 0) ) ) - (func $assembly/i64/add (; 6 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/add (; 6 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:43:2 (set_global $assembly/i64/lo @@ -219,7 +223,7 @@ ) ) ) - (func $assembly/i64/sub (; 7 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/sub (; 7 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:49:2 (set_global $assembly/i64/lo @@ -275,7 +279,7 @@ ) ) ) - (func $assembly/i64/mul (; 8 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/mul (; 8 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:55:2 (set_global $assembly/i64/lo @@ -331,7 +335,7 @@ ) ) ) - (func $assembly/i64/div_s (; 9 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/div_s (; 9 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:61:2 (set_global $assembly/i64/lo @@ -388,7 +392,7 @@ ) ) ) - (func $assembly/i64/div_u (; 10 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/div_u (; 10 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:67:2 (set_global $assembly/i64/lo @@ -444,7 +448,7 @@ ) ) ) - (func $assembly/i64/rem_s (; 11 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/rem_s (; 11 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:73:2 (set_global $assembly/i64/lo @@ -501,7 +505,7 @@ ) ) ) - (func $assembly/i64/rem_u (; 12 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/rem_u (; 12 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:79:2 (set_global $assembly/i64/lo @@ -557,7 +561,7 @@ ) ) ) - (func $assembly/i64/and (; 13 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/and (; 13 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:85:2 (set_global $assembly/i64/lo @@ -613,7 +617,7 @@ ) ) ) - (func $assembly/i64/or (; 14 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/or (; 14 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:91:2 (set_global $assembly/i64/lo @@ -669,7 +673,7 @@ ) ) ) - (func $assembly/i64/xor (; 15 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/xor (; 15 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:97:2 (set_global $assembly/i64/lo @@ -725,7 +729,7 @@ ) ) ) - (func $assembly/i64/shl (; 16 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/shl (; 16 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:103:2 (set_global $assembly/i64/lo @@ -781,7 +785,7 @@ ) ) ) - (func $assembly/i64/shr_s (; 17 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/shr_s (; 17 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:109:2 (set_global $assembly/i64/lo @@ -838,7 +842,7 @@ ) ) ) - (func $assembly/i64/shr_u (; 18 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/shr_u (; 18 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:115:2 (set_global $assembly/i64/lo @@ -894,7 +898,7 @@ ) ) ) - (func $assembly/i64/rotl (; 19 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/rotl (; 19 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:123:2 (set_global $assembly/i64/lo @@ -949,7 +953,7 @@ ) ) ) - (func $assembly/i64/rotr (; 20 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/rotr (; 20 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 i64) ;;@ assembly/i64.ts:131:2 (set_global $assembly/i64/lo @@ -1004,7 +1008,7 @@ ) ) ) - (func $assembly/i64/eq (; 21 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/eq (; 21 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:137:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:136:18 @@ -1046,7 +1050,7 @@ (i32.const 0) ) ) - (func $assembly/i64/ne (; 22 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/ne (; 22 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:143:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:142:18 @@ -1088,7 +1092,7 @@ (i32.const 0) ) ) - (func $assembly/i64/lt_s (; 23 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/lt_s (; 23 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:149:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:148:18 @@ -1130,7 +1134,7 @@ (i32.const 0) ) ) - (func $assembly/i64/lt_u (; 24 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/lt_u (; 24 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:155:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:154:18 @@ -1172,7 +1176,7 @@ (i32.const 0) ) ) - (func $assembly/i64/le_s (; 25 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/le_s (; 25 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:161:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:160:18 @@ -1214,7 +1218,7 @@ (i32.const 0) ) ) - (func $assembly/i64/le_u (; 26 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/le_u (; 26 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:167:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:166:18 @@ -1256,7 +1260,7 @@ (i32.const 0) ) ) - (func $assembly/i64/gt_s (; 27 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/gt_s (; 27 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:173:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:172:18 @@ -1298,7 +1302,7 @@ (i32.const 0) ) ) - (func $assembly/i64/gt_u (; 28 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/gt_u (; 28 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:179:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:178:18 @@ -1340,7 +1344,7 @@ (i32.const 0) ) ) - (func $assembly/i64/ge_s (; 29 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/ge_s (; 29 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:185:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:184:18 @@ -1382,7 +1386,7 @@ (i32.const 0) ) ) - (func $assembly/i64/ge_u (; 30 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/i64/ge_u (; 30 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) ;;@ assembly/i64.ts:191:2 (set_global $assembly/i64/lo ;;@ assembly/i64.ts:190:18 @@ -1424,4 +1428,7 @@ (i32.const 0) ) ) + (func $null (; 31 ;) (; has Stack IR ;) (type $v) + (nop) + ) ) diff --git a/examples/i64-polyfill/build/untouched.wat b/examples/i64-polyfill/build/untouched.wat index 5e81d0df..73041433 100644 --- a/examples/i64-polyfill/build/untouched.wat +++ b/examples/i64-polyfill/build/untouched.wat @@ -2,13 +2,17 @@ (type $i (func (result i32))) (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) + (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $assembly/i64/lo (mut i32) (i32.const 0)) (global $assembly/i64/hi (mut i32) (i32.const 0)) (global $NaN f64 (f64.const nan:0x8000000000000)) (global $Infinity f64 (f64.const inf)) (global $HEAP_BASE i32 (i32.const 8)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getLo" (func $assembly/i64/getLo)) (export "getHi" (func $assembly/i64/getHi)) (export "clz" (func $assembly/i64/clz)) @@ -1523,4 +1527,6 @@ (i32.const 0) ) ) + (func $null (; 31 ;) (type $v) + ) ) diff --git a/examples/mandelbrot/build/optimized.wasm b/examples/mandelbrot/build/optimized.wasm index 85b29a7e..a6245d8a 100644 Binary files a/examples/mandelbrot/build/optimized.wasm and b/examples/mandelbrot/build/optimized.wasm differ diff --git a/examples/mandelbrot/build/optimized.wat b/examples/mandelbrot/build/optimized.wat index 9039e811..f6824b05 100644 --- a/examples/mandelbrot/build/optimized.wat +++ b/examples/mandelbrot/build/optimized.wat @@ -1,13 +1,17 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $FF (func (param f64) (result f64))) - (import "JSMath" "sqrt" (func $~lib/math/JSMath.sqrt (param f64) (result f64))) - (import "JSMath" "log" (func $~lib/math/JSMath.log (param f64) (result f64))) - (import "JSMath" "LN2" (global $~lib/math/JSMath.LN2 f64)) + (type $v (func)) (import "env" "memory" (memory $0 0)) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) + (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) + (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (export "memory" (memory $0)) + (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) - (func $assembly/index/computeLine (; 2 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) + (func $assembly/index/computeLine (; 2 ;) (; has Stack IR ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (local $4 f64) (local $5 f64) (local $6 f64) @@ -279,11 +283,11 @@ ;;@ assembly/index.ts:36:15 (f64.div ;;@ assembly/index.ts:36:20 - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log ;;@ assembly/index.ts:36:29 - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log ;;@ assembly/index.ts:36:38 - (call $~lib/math/JSMath.sqrt + (call $~lib/bindings/Math/sqrt ;;@ assembly/index.ts:36:43 (f64.add (f64.mul @@ -300,7 +304,7 @@ ) ) ;;@ assembly/index.ts:36:66 - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) ) ) (get_local $6) @@ -352,4 +356,7 @@ ) ) ) + (func $null (; 3 ;) (; has Stack IR ;) (type $v) + (nop) + ) ) diff --git a/examples/mandelbrot/build/untouched.wat b/examples/mandelbrot/build/untouched.wat index e1ee20e4..3d313e2d 100644 --- a/examples/mandelbrot/build/untouched.wat +++ b/examples/mandelbrot/build/untouched.wat @@ -3,24 +3,28 @@ (type $FF (func (param f64) (result f64))) (type $Fi (func (param f64) (result i32))) (type $FFFF (func (param f64 f64 f64) (result f64))) - (import "JSMath" "sqrt" (func $~lib/math/JSMath.sqrt (param f64) (result f64))) - (import "JSMath" "log" (func $~lib/math/JSMath.log (param f64) (result f64))) - (import "JSMath" "LN2" (global $~lib/math/JSMath.LN2 f64)) + (type $v (func)) (import "env" "memory" (memory $0 0)) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) + (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) + (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) (global $assembly/index/NUM_COLORS i32 (i32.const 2048)) (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "computeLine" (func $assembly/index/computeLine)) (func $~lib/builtins/isFinite (; 2 ;) (type $Fi) (param $0 f64) (result i32) - ;;@ ~lib/builtins.ts:16:70 + ;;@ ~lib/builtins.ts:16:78 (f64.eq - ;;@ ~lib/builtins.ts:16:53 + ;;@ ~lib/builtins.ts:16:61 (f64.sub (get_local $0) - ;;@ ~lib/builtins.ts:16:61 + ;;@ ~lib/builtins.ts:16:69 (get_local $0) ) - ;;@ ~lib/builtins.ts:16:70 + ;;@ ~lib/builtins.ts:16:78 (f64.const 0) ) ) @@ -195,6 +199,7 @@ (f64.const 4) ) (block + ;;@ assembly/index.ts:18:55 (block ;;@ assembly/index.ts:19:6 (set_local $15 @@ -345,11 +350,11 @@ ;;@ assembly/index.ts:36:15 (f64.div ;;@ assembly/index.ts:36:20 - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log ;;@ assembly/index.ts:36:29 - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log ;;@ assembly/index.ts:36:38 - (call $~lib/math/JSMath.sqrt + (call $~lib/bindings/Math/sqrt ;;@ assembly/index.ts:36:43 (f64.add (f64.mul @@ -368,7 +373,7 @@ ) ) ;;@ assembly/index.ts:36:66 - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) ) ) ;;@ assembly/index.ts:37:4 @@ -460,4 +465,6 @@ ) ) ) + (func $null (; 5 ;) (type $v) + ) ) diff --git a/examples/mandelbrot/index.html b/examples/mandelbrot/index.html index 95681935..a0853643 100644 --- a/examples/mandelbrot/index.html +++ b/examples/mandelbrot/index.html @@ -49,7 +49,7 @@ fetch("build/optimized.wasm") .then(response => response.arrayBuffer()) .then(buffer => WebAssembly.instantiate(buffer, { env: { memory: memory }, - JSMath: Math + Math })) .then(module => { var exports = module.instance.exports; diff --git a/examples/n-body/build/index.asm.js b/examples/n-body/build/index.asm.js index 8332b3c7..1f504a1f 100644 --- a/examples/n-body/build/index.asm.js +++ b/examples/n-body/build/index.asm.js @@ -20,222 +20,179 @@ function asmFunc(global, env, buffer) { var abort = env.abort; var nan = global.NaN; var infinity = global.Infinity; - var $lib_env_abort = env.abort; var $lib_allocator_arena_startOffset = 0; var $lib_allocator_arena_offset = 0; var assembly_index_system = 0; var i64toi32_i32$HIGH_BITS = 0; function $lib_allocator_arena___memory_allocate($0) { $0 = $0 | 0; - var $1 = 0, $2 = 0, $3 = 0, wasm2asm_i32$0 = 0, wasm2asm_i32$1 = 0, wasm2asm_i32$2 = 0; - if ($0) { - if ($0 >>> 0 > 1073741824 >>> 0) abort(); - $1 = $lib_allocator_arena_offset; - $0 = (($1 + $0 | 0) + 7 | 0) & 4294967288 | 0; - $2 = __wasm_current_memory(); - if ($0 >>> 0 > ($2 << 16 | 0) >>> 0) { - $3 = ((($0 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; - if ((__wasm_grow_memory((wasm2asm_i32$0 = $2, wasm2asm_i32$1 = $3, wasm2asm_i32$2 = ($2 | 0) > ($3 | 0), wasm2asm_i32$2 ? wasm2asm_i32$0 : wasm2asm_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($3 | 0) | 0) < (0 | 0)) abort();; - } - $lib_allocator_arena_offset = $0; - return $1 | 0; + var $1 = 0, $2 = 0, $3 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0; + if ($0 >>> 0 > 1073741824 >>> 0) abort(); + $1 = $lib_allocator_arena_offset; + $2 = (($1 + (wasm2js_i32$0 = $0, wasm2js_i32$1 = 1, wasm2js_i32$2 = $0 >>> 0 > 1 >>> 0, wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) + 7 | 0) & 4294967288 | 0; + $3 = __wasm_current_memory(); + if ($2 >>> 0 > ($3 << 16 | 0) >>> 0) { + $0 = ((($2 - $1 | 0) + 65535 | 0) & 4294901760 | 0) >>> 16 | 0; + if ((__wasm_grow_memory((wasm2js_i32$0 = $3, wasm2js_i32$1 = $0, wasm2js_i32$2 = ($3 | 0) > ($0 | 0), wasm2js_i32$2 ? wasm2js_i32$0 : wasm2js_i32$1) | 0) | 0) < (0 | 0)) if ((__wasm_grow_memory($0 | 0) | 0) < (0 | 0)) abort();; } - return 0 | 0; + $lib_allocator_arena_offset = $2; + return $1 | 0; } - function assembly_index_Body_constructor($0, $1, $2, $3, $4, $5, $6, $7) { - $0 = $0 | 0; + function assembly_index_Body_constructor($0, $1, $2, $3, $4, $5, $6) { + $0 = +$0; $1 = +$1; $2 = +$2; $3 = +$3; $4 = +$4; $5 = +$5; $6 = +$6; - $7 = +$7; - var wasm2asm_i32$0 = 0, wasm2asm_f64$0 = 0.0; - if (($0 | 0) == (0 | 0)) { - $0 = $lib_allocator_arena___memory_allocate(56 | 0) | 0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $1; - HEAPF64[wasm2asm_i32$0 >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $2; - HEAPF64[(wasm2asm_i32$0 + 8 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $3; - HEAPF64[(wasm2asm_i32$0 + 16 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $4; - HEAPF64[(wasm2asm_i32$0 + 24 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $5; - HEAPF64[(wasm2asm_i32$0 + 32 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $6; - HEAPF64[(wasm2asm_i32$0 + 40 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $7; - HEAPF64[(wasm2asm_i32$0 + 48 | 0) >> 3] = wasm2asm_f64$0; - } - return $0 | 0; + var $7 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; + $7 = $lib_allocator_arena___memory_allocate(56 | 0) | 0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $0; + HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $1; + HEAPF64[(wasm2js_i32$0 + 8 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $2; + HEAPF64[(wasm2js_i32$0 + 16 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $3; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $4; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $5; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $7; + wasm2js_f64$0 = $6; + HEAPF64[(wasm2js_i32$0 + 48 | 0) >> 3] = wasm2js_f64$0; + return $7 | 0; } - function $lib_memory_memset($0, $1, $2) { + function $lib_internal_memory_memset($0, $1) { $0 = $0 | 0; $1 = $1 | 0; - $2 = $2 | 0; - var i64toi32_i32$2 = 0, i64toi32_i32$0 = 0, $3 = 0, $4 = 0, i64toi32_i32$1 = 0, i64toi32_i32$4 = 0, i64toi32_i32$3 = 0, $4$hi = 0, $14 = 0, $121 = 0, $121$hi = 0, $123$hi = 0, wasm2asm_i32$0 = 0, wasm2asm_i32$1 = 0, wasm2asm_i32$2 = 0, wasm2asm_i32$3 = 0; - if (($2 | 0) == (0 | 0)) return; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - wasm2asm_i32$0 = ($0 + $2 | 0) - 1 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - if ($2 >>> 0 <= 2 >>> 0) return; - wasm2asm_i32$0 = $0 + 1 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0 + 2 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - $3 = $0 + $2 | 0; - wasm2asm_i32$0 = $3 - 2 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - wasm2asm_i32$0 = $3 - 3 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - if ($2 >>> 0 <= 6 >>> 0) return; - wasm2asm_i32$0 = $0 + 3 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - wasm2asm_i32$0 = ($0 + $2 | 0) - 4 | 0; - wasm2asm_i32$1 = $1; - HEAP8[wasm2asm_i32$0 >> 0] = wasm2asm_i32$1; - if ($2 >>> 0 <= 8 >>> 0) return; - $3 = (0 - $0 | 0) & 3 | 0; - $2 = $2 - $3 | 0; - $0 = $0 + $3 | 0; - $1 = Math_imul($1 & 255 | 0, 16843009); - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - $2 = $2 & 4294967292 | 0; - wasm2asm_i32$0 = ($0 + $2 | 0) - 4 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - if ($2 >>> 0 <= 8 >>> 0) return; - wasm2asm_i32$0 = $0 + 4 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0 + 8 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - $3 = $0 + $2 | 0; - wasm2asm_i32$0 = $3 - 12 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $3 - 8 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - if ($2 >>> 0 <= 24 >>> 0) return; - wasm2asm_i32$0 = $0 + 12 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0 + 16 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0 + 20 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0 + 24 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - $3 = $0 + $2 | 0; - wasm2asm_i32$0 = $3 - 28 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $3 - 24 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $3 - 20 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $3 - 16 | 0; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - $3 = ($0 & 4 | 0) + 24 | 0; - $0 = $0 + $3 | 0; - $2 = $2 - $3 | 0; - i64toi32_i32$0 = 0; - i64toi32_i32$0 = i64toi32_i32$0; - $4 = $1; - $4$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - $121 = $1; - $121$hi = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$0 = i64toi32_i32$0; - i64toi32_i32$2 = $1; - i64toi32_i32$1 = 0; - i64toi32_i32$3 = 32; - i64toi32_i32$4 = i64toi32_i32$3 & 31 | 0; - if (32 >>> 0 <= (i64toi32_i32$3 & 63 | 0) >>> 0) { - i64toi32_i32$1 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - $14 = 0; - } else { - i64toi32_i32$1 = ((1 << i64toi32_i32$4 | 0) - 1 | 0) & (i64toi32_i32$2 >>> (32 - i64toi32_i32$4 | 0) | 0) | 0 | (i64toi32_i32$0 << i64toi32_i32$4 | 0) | 0; - $14 = i64toi32_i32$2 << i64toi32_i32$4 | 0; - } - $123$hi = i64toi32_i32$1; - i64toi32_i32$1 = $121$hi; - i64toi32_i32$0 = $121; - i64toi32_i32$2 = $123$hi; - i64toi32_i32$3 = $14; - i64toi32_i32$2 = i64toi32_i32$1 | i64toi32_i32$2 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - $4 = i64toi32_i32$0 | i64toi32_i32$3 | 0; - $4$hi = i64toi32_i32$2; + var $2 = 0, i64toi32_i32$1 = 0, i64toi32_i32$0 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0, wasm2js_i32$2 = 0, wasm2js_i32$3 = 0; + if (($1 | 0) == (0 | 0)) return; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = ($0 + $1 | 0) - 1 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + if ($1 >>> 0 <= 2 >>> 0) return; + wasm2js_i32$0 = $0 + 1 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 2 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + $2 = $0 + $1 | 0; + wasm2js_i32$0 = $2 - 2 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = $2 - 3 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + if ($1 >>> 0 <= 6 >>> 0) return; + wasm2js_i32$0 = $0 + 3 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + wasm2js_i32$0 = ($0 + $1 | 0) - 4 | 0; + wasm2js_i32$1 = 0; + HEAP8[wasm2js_i32$0 >> 0] = wasm2js_i32$1; + if ($1 >>> 0 <= 8 >>> 0) return; + $2 = (0 - $0 | 0) & 3 | 0; + $0 = $0 + $2 | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $1 = ($1 - $2 | 0) & 4294967292 | 0; + wasm2js_i32$0 = ($0 + $1 | 0) - 4 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + if ($1 >>> 0 <= 8 >>> 0) return; + wasm2js_i32$0 = $0 + 4 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 8 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $2 = $0 + $1 | 0; + wasm2js_i32$0 = $2 - 12 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $2 - 8 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + if ($1 >>> 0 <= 24 >>> 0) return; + wasm2js_i32$0 = $0 + 12 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 16 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 20 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0 + 24 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $2 = $0 + $1 | 0; + wasm2js_i32$0 = $2 - 28 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $2 - 24 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $2 - 20 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $2 - 16 | 0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $2 = ($0 & 4 | 0) + 24 | 0; + $0 = $0 + $2 | 0; + $1 = $1 - $2 | 0; continue_0 : do { - if ($2 >>> 0 >= 32 >>> 0) { - i64toi32_i32$2 = $4$hi; - i64toi32_i32$0 = $0; - i64toi32_i32$2 = i64toi32_i32$2; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = $4; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = i64toi32_i32$2; - (wasm2asm_i32$2 = wasm2asm_i32$0, wasm2asm_i32$3 = wasm2asm_i32$1), ((HEAP8[(wasm2asm_i32$2 + 4 | 0) >> 0] = wasm2asm_i32$3 & 255 | 0, HEAP8[(wasm2asm_i32$2 + 5 | 0) >> 0] = (wasm2asm_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 6 | 0) >> 0] = (wasm2asm_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 7 | 0) >> 0] = (wasm2asm_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$0 = $0 + 8 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = $4; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = i64toi32_i32$2; - (wasm2asm_i32$2 = wasm2asm_i32$0, wasm2asm_i32$3 = wasm2asm_i32$1), ((HEAP8[(wasm2asm_i32$2 + 4 | 0) >> 0] = wasm2asm_i32$3 & 255 | 0, HEAP8[(wasm2asm_i32$2 + 5 | 0) >> 0] = (wasm2asm_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 6 | 0) >> 0] = (wasm2asm_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 7 | 0) >> 0] = (wasm2asm_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$0 = $0 + 16 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = $4; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = i64toi32_i32$2; - (wasm2asm_i32$2 = wasm2asm_i32$0, wasm2asm_i32$3 = wasm2asm_i32$1), ((HEAP8[(wasm2asm_i32$2 + 4 | 0) >> 0] = wasm2asm_i32$3 & 255 | 0, HEAP8[(wasm2asm_i32$2 + 5 | 0) >> 0] = (wasm2asm_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 6 | 0) >> 0] = (wasm2asm_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 7 | 0) >> 0] = (wasm2asm_i32$3 >>> 24 | 0) & 255 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - i64toi32_i32$0 = $0 + 24 | 0; - i64toi32_i32$2 = i64toi32_i32$2; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = $4; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = i64toi32_i32$0; - wasm2asm_i32$1 = i64toi32_i32$2; - (wasm2asm_i32$2 = wasm2asm_i32$0, wasm2asm_i32$3 = wasm2asm_i32$1), ((HEAP8[(wasm2asm_i32$2 + 4 | 0) >> 0] = wasm2asm_i32$3 & 255 | 0, HEAP8[(wasm2asm_i32$2 + 5 | 0) >> 0] = (wasm2asm_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 6 | 0) >> 0] = (wasm2asm_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2asm_i32$2 + 7 | 0) >> 0] = (wasm2asm_i32$3 >>> 24 | 0) & 255 | 0; - $2 = $2 - 32 | 0; + if ($1 >>> 0 >= 32 >>> 0) { + i64toi32_i32$1 = $0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 8 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 16 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + i64toi32_i32$1 = $0 + 24 | 0; + i64toi32_i32$0 = 0; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = i64toi32_i32$1; + wasm2js_i32$1 = i64toi32_i32$0; + (wasm2js_i32$2 = wasm2js_i32$0, wasm2js_i32$3 = wasm2js_i32$1), ((HEAP8[(wasm2js_i32$2 + 4 | 0) >> 0] = wasm2js_i32$3 & 255 | 0, HEAP8[(wasm2js_i32$2 + 5 | 0) >> 0] = (wasm2js_i32$3 >>> 8 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 6 | 0) >> 0] = (wasm2js_i32$3 >>> 16 | 0) & 255 | 0), HEAP8[(wasm2js_i32$2 + 7 | 0) >> 0] = (wasm2js_i32$3 >>> 24 | 0) & 255 | 0; + $1 = $1 - 32 | 0; $0 = $0 + 32 | 0; continue continue_0; } @@ -243,171 +200,157 @@ function asmFunc(global, env, buffer) { } while (1); } - function $lib_array_Array_Body__constructor($0, $1) { - $0 = $0 | 0; - $1 = $1 | 0; - var $2 = 0, $3 = 0, wasm2asm_i32$0 = 0, wasm2asm_i32$1 = 0; - if ($1 >>> 0 > 268435454 >>> 0) { - $lib_env_abort(0 | 0, 8 | 0, 23 | 0, 39 | 0); - abort(); - } - $2 = $1 << 2 | 0; - $3 = $lib_allocator_arena___memory_allocate(1 << (32 - Math_clz32($2 + 7 | 0) | 0) | 0 | 0) | 0; - wasm2asm_i32$0 = $3; - wasm2asm_i32$1 = $2; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - if (($0 | 0) == (0 | 0)) { - $0 = $lib_allocator_arena___memory_allocate(8 | 0) | 0; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = 0; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = 0; - HEAP32[(wasm2asm_i32$0 + 4 | 0) >> 2] = wasm2asm_i32$1; - } - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = $3; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - wasm2asm_i32$0 = $0; - wasm2asm_i32$1 = $1; - HEAP32[(wasm2asm_i32$0 + 4 | 0) >> 2] = wasm2asm_i32$1; - $lib_memory_memset($3 + 8 | 0 | 0, 0 | 0, $2 | 0); + function $lib_array_Array_Body__constructor() { + var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_allocator_arena___memory_allocate(32 | 0) | 0; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = 20; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + $0 = $lib_allocator_arena___memory_allocate(8 | 0) | 0; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 0; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = $1; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + wasm2js_i32$0 = $0; + wasm2js_i32$1 = 5; + HEAP32[(wasm2js_i32$0 + 4 | 0) >> 2] = wasm2js_i32$1; + $lib_internal_memory_memset($1 + 8 | 0 | 0, 20 | 0); return $0 | 0; } - function assembly_index_NBodySystem_constructor($0, $1) { + function assembly_index_NBodySystem_constructor($0) { $0 = $0 | 0; - $1 = $1 | 0; - var $2 = 0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $50 = 0, wasm2asm_i32$0 = 0, wasm2asm_f64$0 = 0.0, wasm2asm_i32$1 = 0; - $8 = HEAP32[($1 + 4 | 0) >> 2] | 0; + var $1 = 0, $2 = 0, $3 = 0.0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $49 = 0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0, wasm2js_i32$1 = 0; + $7 = HEAP32[($0 + 4 | 0) >> 2] | 0; break_0 : { repeat_0 : do { - if (($2 | 0) >= ($8 | 0)) break break_0; - $3 = HEAPU32[(((HEAPU32[$1 >> 2] | 0) + ($2 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $4 = +HEAPF64[($3 + 48 | 0) >> 3]; - $5 = $5 + +HEAPF64[($3 + 24 | 0) >> 3] * $4; - $6 = $6 + +HEAPF64[($3 + 32 | 0) >> 3] * $4; - $7 = $7 + +HEAPF64[($3 + 40 | 0) >> 3] * $4; - $2 = $2 + 1 | 0; + if (($1 | 0) >= ($7 | 0)) break break_0; + $2 = HEAPU32[(((HEAPU32[$0 >> 2] | 0) + ($1 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $3 = +HEAPF64[($2 + 48 | 0) >> 3]; + $4 = $4 + +HEAPF64[($2 + 24 | 0) >> 3] * $3; + $5 = $5 + +HEAPF64[($2 + 32 | 0) >> 3] * $3; + $6 = $6 + +HEAPF64[($2 + 40 | 0) >> 3] * $3; + $1 = $1 + 1 | 0; continue repeat_0; break repeat_0; } while (1); }; - $2 = HEAPU32[$1 >> 2] | 0; - if (0 >>> 0 < ((HEAP32[$2 >> 2] | 0) >>> 2 | 0) >>> 0) $50 = HEAPU32[($2 + 8 | 0) >> 2] | 0; else abort(); - $2 = $50; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = -$5 / 39.47841760435743; - HEAPF64[(wasm2asm_i32$0 + 24 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = -$6 / 39.47841760435743; - HEAPF64[(wasm2asm_i32$0 + 32 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = -$7 / 39.47841760435743; - HEAPF64[(wasm2asm_i32$0 + 40 | 0) >> 3] = wasm2asm_f64$0; - if (($0 | 0) == (0 | 0)) { - $2 = $lib_allocator_arena___memory_allocate(4 | 0) | 0; - wasm2asm_i32$0 = $2; - wasm2asm_i32$1 = $1; - HEAP32[wasm2asm_i32$0 >> 2] = wasm2asm_i32$1; - $0 = $2; - } - return $0 | 0; + $1 = HEAPU32[$0 >> 2] | 0; + if (0 >>> 0 < ((HEAP32[$1 >> 2] | 0) >>> 2 | 0) >>> 0) $49 = HEAPU32[($1 + 8 | 0) >> 2] | 0; else abort(); + $1 = $49; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$4 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$5 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = -$6 / 39.47841760435743; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + $1 = $lib_allocator_arena___memory_allocate(4 | 0) | 0; + wasm2js_i32$0 = $1; + wasm2js_i32$1 = $0; + HEAP32[wasm2js_i32$0 >> 2] = wasm2js_i32$1; + return $1 | 0; } function assembly_index_init() { - var $0 = 0, $1 = 0, wasm2asm_i32$0 = 0, wasm2asm_i32$1 = 0; - $1 = $lib_array_Array_Body__constructor(0 | 0, 5 | 0) | 0; - $0 = assembly_index_Body_constructor(0 | 0, +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; - wasm2asm_i32$0 = HEAPU32[$1 >> 2] | 0; - wasm2asm_i32$1 = $0; - HEAP32[(wasm2asm_i32$0 + 8 | 0) >> 2] = wasm2asm_i32$1; - $0 = assembly_index_Body_constructor(0 | 0, +(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; - wasm2asm_i32$0 = (HEAPU32[$1 >> 2] | 0) + 4 | 0; - wasm2asm_i32$1 = $0; - HEAP32[(wasm2asm_i32$0 + 8 | 0) >> 2] = wasm2asm_i32$1; - $0 = assembly_index_Body_constructor(0 | 0, +(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; - wasm2asm_i32$0 = (HEAPU32[$1 >> 2] | 0) + 8 | 0; - wasm2asm_i32$1 = $0; - HEAP32[(wasm2asm_i32$0 + 8 | 0) >> 2] = wasm2asm_i32$1; - $0 = assembly_index_Body_constructor(0 | 0, +(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; - wasm2asm_i32$0 = (HEAPU32[$1 >> 2] | 0) + 12 | 0; - wasm2asm_i32$1 = $0; - HEAP32[(wasm2asm_i32$0 + 8 | 0) >> 2] = wasm2asm_i32$1; - $0 = assembly_index_Body_constructor(0 | 0, +(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; - wasm2asm_i32$0 = (HEAPU32[$1 >> 2] | 0) + 16 | 0; - wasm2asm_i32$1 = $0; - HEAP32[(wasm2asm_i32$0 + 8 | 0) >> 2] = wasm2asm_i32$1; - assembly_index_system = assembly_index_NBodySystem_constructor(0 | 0, $1 | 0) | 0; + var $0 = 0, $1 = 0, wasm2js_i32$0 = 0, wasm2js_i32$1 = 0; + $1 = $lib_array_Array_Body__constructor() | 0; + $0 = assembly_index_Body_constructor(+(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(0.0), +(39.47841760435743)) | 0; + wasm2js_i32$0 = HEAPU32[$1 >> 2] | 0; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + $0 = assembly_index_Body_constructor(+(4.841431442464721), +(-1.1603200440274284), +(-.10362204447112311), +(.606326392995832), +(2.81198684491626), +(-.02521836165988763), +(.03769367487038949)) | 0; + wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 4 | 0; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + $0 = assembly_index_Body_constructor(+(8.34336671824458), +(4.124798564124305), +(-.4035234171143214), +(-1.0107743461787924), +(1.8256623712304119), +(.008415761376584154), +(.011286326131968767)) | 0; + wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 8 | 0; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + $0 = assembly_index_Body_constructor(+(12.894369562139131), +(-15.111151401698631), +(-.22330757889265573), +(1.0827910064415354), +(.8687130181696082), +(-.010832637401363636), +(1.7237240570597112e-03)) | 0; + wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 12 | 0; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + $0 = assembly_index_Body_constructor(+(15.379697114850917), +(-25.919314609987964), +(.17925877295037118), +(.979090732243898), +(.5946989986476762), +(-.034755955504078104), +(2.0336868699246304e-03)) | 0; + wasm2js_i32$0 = (HEAPU32[$1 >> 2] | 0) + 16 | 0; + wasm2js_i32$1 = $0; + HEAP32[(wasm2js_i32$0 + 8 | 0) >> 2] = wasm2js_i32$1; + assembly_index_system = assembly_index_NBodySystem_constructor($1 | 0) | 0; } - function assembly_index_NBodySystem_advance($0, $1) { + function assembly_index_NBodySystem_advance($0) { $0 = $0 | 0; - $1 = +$1; - var $2 = 0, $3 = 0.0, $9 = 0.0, $4 = 0, $5 = 0.0, $6 = 0.0, $7 = 0.0, $8 = 0, $10 = 0.0, $11 = 0.0, $12 = 0.0, $13 = 0, $14 = 0, $19 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, $18 = 0.0, wasm2asm_i32$0 = 0, wasm2asm_f64$0 = 0.0; - $13 = HEAPU32[$0 >> 2] | 0; - $14 = HEAP32[($13 + 4 | 0) >> 2] | 0; + var $1 = 0, $2 = 0.0, $8 = 0.0, $3 = 0, $4 = 0.0, $5 = 0.0, $6 = 0.0, $7 = 0, $9 = 0.0, $10 = 0.0, $11 = 0.0, $12 = 0, $13 = 0, $18 = 0.0, $14 = 0.0, $15 = 0.0, $16 = 0.0, $17 = 0.0, wasm2js_i32$0 = 0, wasm2js_f64$0 = 0.0; + $12 = HEAPU32[$0 >> 2] | 0; + $13 = HEAP32[($12 + 4 | 0) >> 2] | 0; break_0 : { repeat_0 : do { - if ($4 >>> 0 >= $14 >>> 0) break break_0; - $0 = HEAPU32[(((HEAPU32[$13 >> 2] | 0) + ($4 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $15 = +HEAPF64[$0 >> 3]; - $16 = +HEAPF64[($0 + 8 | 0) >> 3]; - $17 = +HEAPF64[($0 + 16 | 0) >> 3]; - $5 = +HEAPF64[($0 + 24 | 0) >> 3]; - $6 = +HEAPF64[($0 + 32 | 0) >> 3]; - $7 = +HEAPF64[($0 + 40 | 0) >> 3]; - $18 = +HEAPF64[($0 + 48 | 0) >> 3]; + if ($3 >>> 0 >= $13 >>> 0) break break_0; + $0 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($3 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $14 = +HEAPF64[$0 >> 3]; + $15 = +HEAPF64[($0 + 8 | 0) >> 3]; + $16 = +HEAPF64[($0 + 16 | 0) >> 3]; + $4 = +HEAPF64[($0 + 24 | 0) >> 3]; + $5 = +HEAPF64[($0 + 32 | 0) >> 3]; + $6 = +HEAPF64[($0 + 40 | 0) >> 3]; + $17 = +HEAPF64[($0 + 48 | 0) >> 3]; break_1 : { - $8 = $4 + 1 | 0; + $7 = $3 + 1 | 0; repeat_1 : do { - if ($8 >>> 0 >= $14 >>> 0) break break_1; - $2 = HEAPU32[(((HEAPU32[$13 >> 2] | 0) + ($8 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; - $19 = $15 - +HEAPF64[$2 >> 3]; - $3 = $19; - $10 = $16 - +HEAPF64[($2 + 8 | 0) >> 3]; - $11 = $17 - +HEAPF64[($2 + 16 | 0) >> 3]; - $9 = $3 * $3 + $10 * $10 + $11 * $11; - $12 = Math_sqrt($9); - $12 = $1 / ($9 * $12); - $9 = +HEAPF64[($2 + 48 | 0) >> 3] * $12; - $5 = $5 - $3 * $9; - $6 = $6 - $10 * $9; - $7 = $7 - $11 * $9; - $3 = $18 * $12; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = +HEAPF64[($2 + 24 | 0) >> 3] + $19 * $3; - HEAPF64[(wasm2asm_i32$0 + 24 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = +HEAPF64[($2 + 32 | 0) >> 3] + $10 * $3; - HEAPF64[(wasm2asm_i32$0 + 32 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $2; - wasm2asm_f64$0 = +HEAPF64[($2 + 40 | 0) >> 3] + $11 * $3; - HEAPF64[(wasm2asm_i32$0 + 40 | 0) >> 3] = wasm2asm_f64$0; - $8 = $8 + 1 | 0; + if ($7 >>> 0 >= $13 >>> 0) break break_1; + $1 = HEAPU32[(((HEAPU32[$12 >> 2] | 0) + ($7 << 2 | 0) | 0) + 8 | 0) >> 2] | 0; + $18 = $14 - +HEAPF64[$1 >> 3]; + $2 = $18; + $9 = $15 - +HEAPF64[($1 + 8 | 0) >> 3]; + $10 = $16 - +HEAPF64[($1 + 16 | 0) >> 3]; + $8 = $2 * $2 + $9 * $9 + $10 * $10; + $11 = Math_sqrt($8); + $11 = .01 / ($8 * $11); + $8 = +HEAPF64[($1 + 48 | 0) >> 3] * $11; + $4 = $4 - $2 * $8; + $5 = $5 - $9 * $8; + $6 = $6 - $10 * $8; + $2 = $17 * $11; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = +HEAPF64[($1 + 24 | 0) >> 3] + $18 * $2; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = +HEAPF64[($1 + 32 | 0) >> 3] + $9 * $2; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $1; + wasm2js_f64$0 = +HEAPF64[($1 + 40 | 0) >> 3] + $10 * $2; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + $7 = $7 + 1 | 0; continue repeat_1; break repeat_1; } while (1); }; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $5; - HEAPF64[(wasm2asm_i32$0 + 24 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $6; - HEAPF64[(wasm2asm_i32$0 + 32 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = $7; - HEAPF64[(wasm2asm_i32$0 + 40 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = +HEAPF64[$0 >> 3] + $1 * $5; - HEAPF64[wasm2asm_i32$0 >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = +HEAPF64[($0 + 8 | 0) >> 3] + $1 * $6; - HEAPF64[(wasm2asm_i32$0 + 8 | 0) >> 3] = wasm2asm_f64$0; - wasm2asm_i32$0 = $0; - wasm2asm_f64$0 = +HEAPF64[($0 + 16 | 0) >> 3] + $1 * $7; - HEAPF64[(wasm2asm_i32$0 + 16 | 0) >> 3] = wasm2asm_f64$0; - $4 = $4 + 1 | 0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = $4; + HEAPF64[(wasm2js_i32$0 + 24 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = $5; + HEAPF64[(wasm2js_i32$0 + 32 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = $6; + HEAPF64[(wasm2js_i32$0 + 40 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = +HEAPF64[$0 >> 3] + .01 * $4; + HEAPF64[wasm2js_i32$0 >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = +HEAPF64[($0 + 8 | 0) >> 3] + .01 * $5; + HEAPF64[(wasm2js_i32$0 + 8 | 0) >> 3] = wasm2js_f64$0; + wasm2js_i32$0 = $0; + wasm2js_f64$0 = +HEAPF64[($0 + 16 | 0) >> 3] + .01 * $6; + HEAPF64[(wasm2js_i32$0 + 16 | 0) >> 3] = wasm2js_f64$0; + $3 = $3 + 1 | 0; continue repeat_0; break repeat_0; } while (1); @@ -459,7 +402,7 @@ function asmFunc(global, env, buffer) { } function assembly_index_step() { - assembly_index_NBodySystem_advance(assembly_index_system | 0, +(.01)); + assembly_index_NBodySystem_advance(assembly_index_system | 0); return +(+assembly_index_NBodySystem_energy(assembly_index_system | 0)); } @@ -469,7 +412,7 @@ function asmFunc(global, env, buffer) { break_0 : { repeat_0 : do { if ($1 >>> 0 >= $0 >>> 0) break break_0; - assembly_index_NBodySystem_advance(assembly_index_system | 0, +(.01)); + assembly_index_NBodySystem_advance(assembly_index_system | 0); $1 = $1 + 1 | 0; continue repeat_0; break repeat_0; @@ -495,6 +438,11 @@ function asmFunc(global, env, buffer) { $lib_allocator_arena_offset = $lib_allocator_arena_startOffset; } + function null_() { + + } + + var FUNCTION_TABLE_v = [null_]; function __wasm_grow_memory(pagesToAdd) { pagesToAdd = pagesToAdd | 0; var oldPages = __wasm_current_memory() | 0; @@ -538,3 +486,27 @@ function asmFunc(global, env, buffer) { getBody: assembly_index_getBody }; } + +const memasmFunc = new ArrayBuffer(65536); +const assignasmFunc = ( + function(mem) { + const _mem = new Uint8Array(mem); + return function(offset, s) { + if (typeof Buffer === 'undefined') { + const bytes = atob(s); + for (let i = 0; i < bytes.length; i++) + _mem[offset + i] = bytes.charCodeAt(i); + } else { + const bytes = Buffer.from(s, 'base64'); + for (let i = 0; i < bytes.length; i++) + _mem[offset + i] = bytes[i]; + } + } + } + )(memasmFunc); +assignasmFunc(8, "DQAAAH4AbABpAGIALwBhAHIAcgBhAHkALgB0AHM="); +const retasmFunc = asmFunc({Math,Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,NaN,Infinity}, {abort:function() { throw new Error('abort'); }},memasmFunc); +export const memory = retasmFunc.memory; +export const init = retasmFunc.init; +export const step = retasmFunc.step; +export const bench = retasmFunc.bench; diff --git a/examples/n-body/build/optimized.wasm b/examples/n-body/build/optimized.wasm index 16b3a34e..58cf1164 100644 Binary files a/examples/n-body/build/optimized.wasm and b/examples/n-body/build/optimized.wasm differ diff --git a/examples/n-body/build/optimized.wat b/examples/n-body/build/optimized.wat index 9ff7cafe..faf58123 100644 --- a/examples/n-body/build/optimized.wat +++ b/examples/n-body/build/optimized.wat @@ -1,180 +1,174 @@ (module (type $v (func)) - (type $iFFFFFFFi (func (param i32 f64 f64 f64 f64 f64 f64 f64) (result i32))) (type $ii (func (param i32) (result i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $iiiiv (func (param i32 i32 i32 i32))) - (type $iiiv (func (param i32 i32 i32))) (type $F (func (result f64))) - (type $iFv (func (param i32 f64))) (type $iF (func (param i32) (result f64))) (type $iv (func (param i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (type $FUNCSIG$iddddddd (func (param f64 f64 f64 f64 f64 f64 f64) (result i32))) + (type $FUNCSIG$vii (func (param i32 i32))) + (type $FUNCSIG$i (func (result i32))) + (type $FUNCSIG$ii (func (param i32) (result i32))) + (type $FUNCSIG$vi (func (param i32))) (import "env" "memory" (memory $0 1)) + (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $assembly/index/system (mut i32) (i32.const 0)) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) (export "getBody" (func $assembly/index/getBody)) (start $start) - (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (if - (get_local $0) - (block + (i32.gt_u + (get_local $0) + (i32.const 1073741824) + ) + (unreachable) + ) + (if + (i32.gt_u + (tee_local $2 + (i32.and + (i32.add + (i32.add + (tee_local $1 + (get_global $~lib/allocator/arena/offset) + ) + (select + (get_local $0) + (i32.const 1) + (i32.gt_u + (get_local $0) + (i32.const 1) + ) + ) + ) + (i32.const 7) + ) + (i32.const -8) + ) + ) + (i32.shl + (tee_local $3 + (current_memory) + ) + (i32.const 16) + ) + ) + (if + (i32.lt_s + (grow_memory + (select + (get_local $3) + (tee_local $0 + (i32.shr_u + (i32.and + (i32.add + (i32.sub + (get_local $2) + (get_local $1) + ) + (i32.const 65535) + ) + (i32.const -65536) + ) + (i32.const 16) + ) + ) + (i32.gt_s + (get_local $3) + (get_local $0) + ) + ) + ) + (i32.const 0) + ) (if - (i32.gt_u - (get_local $0) - (i32.const 1073741824) + (i32.lt_s + (grow_memory + (get_local $0) + ) + (i32.const 0) ) (unreachable) ) - (if - (i32.gt_u - (tee_local $0 - (i32.and - (i32.add - (i32.add - (tee_local $1 - (get_global $~lib/allocator/arena/offset) - ) - (get_local $0) - ) - (i32.const 7) - ) - (i32.const -8) - ) - ) - (i32.shl - (tee_local $2 - (current_memory) - ) - (i32.const 16) - ) - ) - (if - (i32.lt_s - (grow_memory - (select - (get_local $2) - (tee_local $3 - (i32.shr_u - (i32.and - (i32.add - (i32.sub - (get_local $0) - (get_local $1) - ) - (i32.const 65535) - ) - (i32.const -65536) - ) - (i32.const 16) - ) - ) - (i32.gt_s - (get_local $2) - (get_local $3) - ) - ) - ) - (i32.const 0) - ) - (if - (i32.lt_s - (grow_memory - (get_local $3) - ) - (i32.const 0) - ) - (unreachable) - ) - ) - ) - (set_global $~lib/allocator/arena/offset - (get_local $0) - ) - (return - (get_local $1) - ) ) ) - (i32.const 0) - ) - (func $assembly/index/Body#constructor (; 2 ;) (type $iFFFFFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (param $7 f64) (result i32) - (if - (i32.eqz - (get_local $0) - ) - (block - (f64.store - (tee_local $0 - (call $~lib/allocator/arena/__memory_allocate - (i32.const 56) - ) - ) - (get_local $1) - ) - (f64.store offset=8 - (get_local $0) - (get_local $2) - ) - (f64.store offset=16 - (get_local $0) - (get_local $3) - ) - (f64.store offset=24 - (get_local $0) - (get_local $4) - ) - (f64.store offset=32 - (get_local $0) - (get_local $5) - ) - (f64.store offset=40 - (get_local $0) - (get_local $6) - ) - (f64.store offset=48 - (get_local $0) - (get_local $7) - ) - ) + (set_global $~lib/allocator/arena/offset + (get_local $2) ) - (get_local $0) + (get_local $1) ) - (func $~lib/memory/memset (; 3 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i64) + (func $assembly/index/Body#constructor (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$iddddddd) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 f64) (param $4 f64) (param $5 f64) (param $6 f64) (result i32) + (local $7 i32) + (f64.store + (tee_local $7 + (call $~lib/allocator/arena/__memory_allocate + (i32.const 56) + ) + ) + (get_local $0) + ) + (f64.store offset=8 + (get_local $7) + (get_local $1) + ) + (f64.store offset=16 + (get_local $7) + (get_local $2) + ) + (f64.store offset=24 + (get_local $7) + (get_local $3) + ) + (f64.store offset=32 + (get_local $7) + (get_local $4) + ) + (f64.store offset=40 + (get_local $7) + (get_local $5) + ) + (f64.store offset=48 + (get_local $7) + (get_local $6) + ) + (get_local $7) + ) + (func $~lib/internal/memory/memset (; 2 ;) (; has Stack IR ;) (type $FUNCSIG$vii) (param $0 i32) (param $1 i32) + (local $2 i32) (if (i32.eqz - (get_local $2) + (get_local $1) ) (return) ) (i32.store8 (get_local $0) - (get_local $1) + (i32.const 0) ) (i32.store8 (i32.sub (i32.add (get_local $0) - (get_local $2) + (get_local $1) ) (i32.const 1) ) - (get_local $1) + (i32.const 0) ) (if (i32.le_u - (get_local $2) + (get_local $1) (i32.const 2) ) (return) @@ -184,37 +178,37 @@ (get_local $0) (i32.const 1) ) - (get_local $1) + (i32.const 0) ) (i32.store8 (i32.add (get_local $0) (i32.const 2) ) - (get_local $1) + (i32.const 0) ) (i32.store8 (i32.sub - (tee_local $3 + (tee_local $2 (i32.add (get_local $0) - (get_local $2) + (get_local $1) ) ) (i32.const 2) ) - (get_local $1) + (i32.const 0) ) (i32.store8 (i32.sub - (get_local $3) + (get_local $2) (i32.const 3) ) - (get_local $1) + (i32.const 0) ) (if (i32.le_u - (get_local $2) + (get_local $1) (i32.const 6) ) (return) @@ -224,74 +218,63 @@ (get_local $0) (i32.const 3) ) - (get_local $1) + (i32.const 0) ) (i32.store8 (i32.sub (i32.add (get_local $0) - (get_local $2) + (get_local $1) ) (i32.const 4) ) - (get_local $1) + (i32.const 0) ) (if (i32.le_u - (get_local $2) + (get_local $1) (i32.const 8) ) (return) ) - (set_local $2 - (i32.sub - (get_local $2) - (tee_local $3 - (i32.and - (i32.sub - (i32.const 0) - (get_local $0) - ) - (i32.const 3) - ) - ) - ) - ) (i32.store (tee_local $0 (i32.add (get_local $0) - (get_local $3) - ) - ) - (tee_local $1 - (i32.mul - (i32.and - (get_local $1) - (i32.const 255) + (tee_local $2 + (i32.and + (i32.sub + (i32.const 0) + (get_local $0) + ) + (i32.const 3) + ) ) - (i32.const 16843009) ) ) + (i32.const 0) ) (i32.store (i32.sub (i32.add (get_local $0) - (tee_local $2 + (tee_local $1 (i32.and - (get_local $2) + (i32.sub + (get_local $1) + (get_local $2) + ) (i32.const -4) ) ) ) (i32.const 4) ) - (get_local $1) + (i32.const 0) ) (if (i32.le_u - (get_local $2) + (get_local $1) (i32.const 8) ) (return) @@ -301,37 +284,37 @@ (get_local $0) (i32.const 4) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.add (get_local $0) (i32.const 8) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (tee_local $3 + (tee_local $2 (i32.add (get_local $0) - (get_local $2) + (get_local $1) ) ) (i32.const 12) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (get_local $3) + (get_local $2) (i32.const 8) ) - (get_local $1) + (i32.const 0) ) (if (i32.le_u - (get_local $2) + (get_local $1) (i32.const 24) ) (return) @@ -341,66 +324,66 @@ (get_local $0) (i32.const 12) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.add (get_local $0) (i32.const 16) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.add (get_local $0) (i32.const 20) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.add (get_local $0) (i32.const 24) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (tee_local $3 + (tee_local $2 (i32.add (get_local $0) - (get_local $2) + (get_local $1) ) ) (i32.const 28) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (get_local $3) + (get_local $2) (i32.const 24) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (get_local $3) + (get_local $2) (i32.const 20) ) - (get_local $1) + (i32.const 0) ) (i32.store (i32.sub - (get_local $3) + (get_local $2) (i32.const 16) ) - (get_local $1) + (i32.const 0) ) (set_local $0 (i32.add (get_local $0) - (tee_local $3 + (tee_local $2 (i32.add (i32.and (get_local $0) @@ -411,60 +394,47 @@ ) ) ) - (set_local $2 + (set_local $1 (i32.sub + (get_local $1) (get_local $2) - (get_local $3) - ) - ) - (set_local $4 - (i64.or - (tee_local $4 - (i64.extend_u/i32 - (get_local $1) - ) - ) - (i64.shl - (get_local $4) - (i64.const 32) - ) ) ) (loop $continue|0 (if (i32.ge_u - (get_local $2) + (get_local $1) (i32.const 32) ) (block (i64.store (get_local $0) - (get_local $4) + (i64.const 0) ) (i64.store (i32.add (get_local $0) (i32.const 8) ) - (get_local $4) + (i64.const 0) ) (i64.store (i32.add (get_local $0) (i32.const 16) ) - (get_local $4) + (i64.const 0) ) (i64.store (i32.add (get_local $0) (i32.const 24) ) - (get_local $4) + (i64.const 0) ) - (set_local $2 + (set_local $1 (i32.sub - (get_local $2) + (get_local $1) (i32.const 32) ) ) @@ -479,116 +449,77 @@ ) ) ) - (func $~lib/array/Array#constructor (; 4 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (if - (i32.gt_u - (get_local $1) - (i32.const 268435454) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 23) - (i32.const 39) - ) - (unreachable) - ) - ) + (func $~lib/array/Array#constructor (; 3 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) + (local $0 i32) + (local $1 i32) (i32.store - (tee_local $3 + (tee_local $1 (call $~lib/allocator/arena/__memory_allocate - (i32.shl - (i32.const 1) - (i32.sub - (i32.const 32) - (i32.clz - (i32.add - (tee_local $2 - (i32.shl - (get_local $1) - (i32.const 2) - ) - ) - (i32.const 7) - ) - ) - ) - ) - ) - ) - (get_local $2) - ) - (if - (i32.eqz - (get_local $0) - ) - (block - (i32.store - (tee_local $0 - (call $~lib/allocator/arena/__memory_allocate - (i32.const 8) - ) - ) - (i32.const 0) - ) - (i32.store offset=4 - (get_local $0) - (i32.const 0) + (i32.const 32) ) ) + (i32.const 20) ) (i32.store - (get_local $0) - (get_local $3) + (tee_local $0 + (call $~lib/allocator/arena/__memory_allocate + (i32.const 8) + ) + ) + (i32.const 0) ) (i32.store offset=4 + (get_local $0) + (i32.const 0) + ) + (i32.store (get_local $0) (get_local $1) ) - (call $~lib/memory/memset + (i32.store offset=4 + (get_local $0) + (i32.const 5) + ) + (call $~lib/internal/memory/memset (i32.add - (get_local $3) + (get_local $1) (i32.const 8) ) - (i32.const 0) - (get_local $2) + (i32.const 20) ) (get_local $0) ) - (func $assembly/index/NBodySystem#constructor (; 5 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 4 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) - (local $3 i32) + (local $3 f64) (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 i32) - (set_local $8 + (local $7 i32) + (set_local $7 (i32.load offset=4 - (get_local $1) + (get_local $0) ) ) (block $break|0 (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $2) - (get_local $8) + (get_local $1) + (get_local $7) ) ) - (set_local $4 + (set_local $3 (f64.load offset=48 - (tee_local $3 + (tee_local $2 (i32.load offset=8 (i32.add (i32.load - (get_local $1) + (get_local $0) ) (i32.shl - (get_local $2) + (get_local $1) (i32.const 2) ) ) @@ -596,42 +527,42 @@ ) ) ) + (set_local $4 + (f64.add + (get_local $4) + (f64.mul + (f64.load offset=24 + (get_local $2) + ) + (get_local $3) + ) + ) + ) (set_local $5 (f64.add (get_local $5) (f64.mul - (f64.load offset=24 - (get_local $3) + (f64.load offset=32 + (get_local $2) ) - (get_local $4) + (get_local $3) ) ) ) (set_local $6 (f64.add (get_local $6) - (f64.mul - (f64.load offset=32 - (get_local $3) - ) - (get_local $4) - ) - ) - ) - (set_local $7 - (f64.add - (get_local $7) (f64.mul (f64.load offset=40 - (get_local $3) + (get_local $2) ) - (get_local $4) + (get_local $3) ) ) ) - (set_local $2 + (set_local $1 (i32.add - (get_local $2) + (get_local $1) (i32.const 1) ) ) @@ -639,15 +570,15 @@ ) ) (f64.store offset=24 - (tee_local $2 + (tee_local $1 (if (result i32) (i32.lt_u (i32.const 0) (i32.shr_u (i32.load - (tee_local $2 + (tee_local $1 (i32.load - (get_local $1) + (get_local $0) ) ) ) @@ -655,11 +586,20 @@ ) ) (i32.load offset=8 - (get_local $2) + (get_local $1) ) (unreachable) ) ) + (f64.div + (f64.neg + (get_local $4) + ) + (f64.const 39.47841760435743) + ) + ) + (f64.store offset=32 + (get_local $1) (f64.div (f64.neg (get_local $5) @@ -667,8 +607,8 @@ (f64.const 39.47841760435743) ) ) - (f64.store offset=32 - (get_local $2) + (f64.store offset=40 + (get_local $1) (f64.div (f64.neg (get_local $6) @@ -676,47 +616,24 @@ (f64.const 39.47841760435743) ) ) - (f64.store offset=40 - (get_local $2) - (f64.div - (f64.neg - (get_local $7) + (i32.store + (tee_local $1 + (call $~lib/allocator/arena/__memory_allocate + (i32.const 4) ) - (f64.const 39.47841760435743) ) + (get_local $0) ) - (if - (i32.eqz - (get_local $0) - ) - (block - (i32.store - (tee_local $2 - (call $~lib/allocator/arena/__memory_allocate - (i32.const 4) - ) - ) - (get_local $1) - ) - (set_local $0 - (get_local $2) - ) - ) - ) - (get_local $0) + (get_local $1) ) - (func $assembly/index/init (; 6 ;) (type $v) + (func $assembly/index/init (; 5 ;) (; has Stack IR ;) (type $v) (local $0 i32) (local $1 i32) (set_local $1 - (call $~lib/array/Array#constructor - (i32.const 0) - (i32.const 5) - ) + (call $~lib/array/Array#constructor) ) (set_local $0 (call $assembly/index/Body#constructor - (i32.const 0) (f64.const 0) (f64.const 0) (f64.const 0) @@ -734,7 +651,6 @@ ) (set_local $0 (call $assembly/index/Body#constructor - (i32.const 0) (f64.const 4.841431442464721) (f64.const -1.1603200440274284) (f64.const -0.10362204447112311) @@ -755,7 +671,6 @@ ) (set_local $0 (call $assembly/index/Body#constructor - (i32.const 0) (f64.const 8.34336671824458) (f64.const 4.124798564124305) (f64.const -0.4035234171143214) @@ -776,7 +691,6 @@ ) (set_local $0 (call $assembly/index/Body#constructor - (i32.const 0) (f64.const 12.894369562139131) (f64.const -15.111151401698631) (f64.const -0.22330757889265573) @@ -797,7 +711,6 @@ ) (set_local $0 (call $assembly/index/Body#constructor - (i32.const 0) (f64.const 15.379697114850917) (f64.const -25.919314609987964) (f64.const 0.17925877295037118) @@ -818,33 +731,32 @@ ) (set_global $assembly/index/system (call $assembly/index/NBodySystem#constructor - (i32.const 0) (get_local $1) ) ) ) - (func $assembly/index/NBodySystem#advance (; 7 ;) (type $iFv) (param $0 i32) (param $1 f64) - (local $2 i32) - (local $3 f64) - (local $4 i32) + (func $assembly/index/NBodySystem#advance (; 6 ;) (; has Stack IR ;) (type $FUNCSIG$vi) (param $0 i32) + (local $1 i32) + (local $2 f64) + (local $3 i32) + (local $4 f64) (local $5 f64) (local $6 f64) - (local $7 f64) - (local $8 i32) + (local $7 i32) + (local $8 f64) (local $9 f64) (local $10 f64) (local $11 f64) - (local $12 f64) + (local $12 i32) (local $13 i32) - (local $14 i32) + (local $14 f64) (local $15 f64) (local $16 f64) (local $17 f64) (local $18 f64) - (local $19 f64) - (set_local $14 + (set_local $13 (i32.load offset=4 - (tee_local $13 + (tee_local $12 (i32.load (get_local $0) ) @@ -855,20 +767,20 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_u - (get_local $4) - (get_local $14) + (get_local $3) + (get_local $13) ) ) - (set_local $15 + (set_local $14 (f64.load (tee_local $0 (i32.load offset=8 (i32.add (i32.load - (get_local $13) + (get_local $12) ) (i32.shl - (get_local $4) + (get_local $3) (i32.const 2) ) ) @@ -876,69 +788,69 @@ ) ) ) - (set_local $16 + (set_local $15 (f64.load offset=8 (get_local $0) ) ) - (set_local $17 + (set_local $16 (f64.load offset=16 (get_local $0) ) ) - (set_local $5 + (set_local $4 (f64.load offset=24 (get_local $0) ) ) - (set_local $6 + (set_local $5 (f64.load offset=32 (get_local $0) ) ) - (set_local $7 + (set_local $6 (f64.load offset=40 (get_local $0) ) ) - (set_local $18 + (set_local $17 (f64.load offset=48 (get_local $0) ) ) (block $break|1 - (set_local $8 + (set_local $7 (i32.add - (get_local $4) + (get_local $3) (i32.const 1) ) ) (loop $repeat|1 (br_if $break|1 (i32.ge_u - (get_local $8) - (get_local $14) + (get_local $7) + (get_local $13) ) ) - (set_local $12 + (set_local $11 (f64.sqrt - (tee_local $9 + (tee_local $8 (f64.add (f64.add (f64.mul - (tee_local $3 - (tee_local $19 + (tee_local $2 + (tee_local $18 (f64.sub - (get_local $15) + (get_local $14) (f64.load - (tee_local $2 + (tee_local $1 (i32.load offset=8 (i32.add (i32.load - (get_local $13) + (get_local $12) ) (i32.shl - (get_local $8) + (get_local $7) (i32.const 2) ) ) @@ -948,30 +860,54 @@ ) ) ) - (get_local $3) + (get_local $2) ) (f64.mul - (tee_local $10 + (tee_local $9 (f64.sub - (get_local $16) + (get_local $15) (f64.load offset=8 - (get_local $2) + (get_local $1) ) ) ) - (get_local $10) + (get_local $9) ) ) (f64.mul - (tee_local $11 + (tee_local $10 (f64.sub - (get_local $17) + (get_local $16) (f64.load offset=16 - (get_local $2) + (get_local $1) + ) + ) + ) + (get_local $10) + ) + ) + ) + ) + ) + (set_local $4 + (f64.sub + (get_local $4) + (f64.mul + (get_local $2) + (tee_local $8 + (f64.mul + (f64.load offset=48 + (get_local $1) + ) + (tee_local $11 + (f64.div + (f64.const 0.01) + (f64.mul + (get_local $8) + (get_local $11) ) ) ) - (get_local $11) ) ) ) @@ -981,23 +917,8 @@ (f64.sub (get_local $5) (f64.mul - (get_local $3) - (tee_local $9 - (f64.mul - (f64.load offset=48 - (get_local $2) - ) - (tee_local $12 - (f64.div - (get_local $1) - (f64.mul - (get_local $9) - (get_local $12) - ) - ) - ) - ) - ) + (get_local $9) + (get_local $8) ) ) ) @@ -1006,63 +927,54 @@ (get_local $6) (f64.mul (get_local $10) - (get_local $9) - ) - ) - ) - (set_local $7 - (f64.sub - (get_local $7) - (f64.mul - (get_local $11) - (get_local $9) + (get_local $8) ) ) ) (f64.store offset=24 - (get_local $2) + (get_local $1) (f64.add (f64.load offset=24 - (get_local $2) + (get_local $1) ) (f64.mul - (get_local $19) - (tee_local $3 + (get_local $18) + (tee_local $2 (f64.mul - (get_local $18) - (get_local $12) + (get_local $17) + (get_local $11) ) ) ) ) ) (f64.store offset=32 - (get_local $2) + (get_local $1) (f64.add (f64.load offset=32 - (get_local $2) + (get_local $1) ) (f64.mul - (get_local $10) - (get_local $3) + (get_local $9) + (get_local $2) ) ) ) (f64.store offset=40 - (get_local $2) + (get_local $1) (f64.add (f64.load offset=40 - (get_local $2) + (get_local $1) ) (f64.mul - (get_local $11) - (get_local $3) + (get_local $10) + (get_local $2) ) ) ) - (set_local $8 + (set_local $7 (i32.add - (get_local $8) + (get_local $7) (i32.const 1) ) ) @@ -1071,15 +983,15 @@ ) (f64.store offset=24 (get_local $0) - (get_local $5) + (get_local $4) ) (f64.store offset=32 (get_local $0) - (get_local $6) + (get_local $5) ) (f64.store offset=40 (get_local $0) - (get_local $7) + (get_local $6) ) (f64.store (get_local $0) @@ -1088,8 +1000,8 @@ (get_local $0) ) (f64.mul - (get_local $1) - (get_local $5) + (f64.const 0.01) + (get_local $4) ) ) ) @@ -1100,8 +1012,8 @@ (get_local $0) ) (f64.mul - (get_local $1) - (get_local $6) + (f64.const 0.01) + (get_local $5) ) ) ) @@ -1112,14 +1024,14 @@ (get_local $0) ) (f64.mul - (get_local $1) - (get_local $7) + (f64.const 0.01) + (get_local $6) ) ) ) - (set_local $4 + (set_local $3 (i32.add - (get_local $4) + (get_local $3) (i32.const 1) ) ) @@ -1127,7 +1039,7 @@ ) ) ) - (func $assembly/index/NBodySystem#energy (; 8 ;) (type $iF) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 7 ;) (; has Stack IR ;) (type $iF) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1324,16 +1236,15 @@ ) (get_local $1) ) - (func $assembly/index/step (; 9 ;) (type $F) (result f64) + (func $assembly/index/step (; 8 ;) (; has Stack IR ;) (type $F) (result f64) (call $assembly/index/NBodySystem#advance (get_global $assembly/index/system) - (f64.const 0.01) ) (call $assembly/index/NBodySystem#energy (get_global $assembly/index/system) ) ) - (func $assembly/index/bench (; 10 ;) (type $iv) (param $0 i32) + (func $assembly/index/bench (; 9 ;) (; has Stack IR ;) (type $iv) (param $0 i32) (local $1 i32) (block $break|0 (loop $repeat|0 @@ -1345,7 +1256,6 @@ ) (call $assembly/index/NBodySystem#advance (get_global $assembly/index/system) - (f64.const 0.01) ) (set_local $1 (i32.add @@ -1357,7 +1267,7 @@ ) ) ) - (func $assembly/index/getBody (; 11 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 10 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (tee_local $0 (if (result i32) @@ -1400,7 +1310,7 @@ ) ) ) - (func $start (; 12 ;) (type $v) + (func $start (; 11 ;) (; has Stack IR ;) (type $v) (set_global $~lib/allocator/arena/startOffset (i32.const 40) ) @@ -1408,4 +1318,7 @@ (get_global $~lib/allocator/arena/startOffset) ) ) + (func $null (; 12 ;) (; has Stack IR ;) (type $v) + (nop) + ) ) diff --git a/examples/n-body/build/untouched.wat b/examples/n-body/build/untouched.wat index e004ff85..906e593b 100644 --- a/examples/n-body/build/untouched.wat +++ b/examples/n-body/build/untouched.wat @@ -11,8 +11,12 @@ (type $iFv (func (param i32 f64))) (type $iF (func (param i32) (result f64))) (type $iv (func (param i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (import "env" "memory" (memory $0 1)) + (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -26,9 +30,8 @@ (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) (global $HEAP_BASE i32 (i32.const 100)) - (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (export "init" (func $assembly/index/init)) (export "step" (func $assembly/index/step)) (export "bench" (func $assembly/index/bench)) @@ -44,161 +47,162 @@ ;;@ ~lib/allocator/arena.ts:18:2 (if ;;@ ~lib/allocator/arena.ts:18:6 - (get_local $0) - ;;@ ~lib/allocator/arena.ts:18:12 - (block - ;;@ ~lib/allocator/arena.ts:19:4 - (if - ;;@ ~lib/allocator/arena.ts:19:8 - (i32.gt_u - (get_local $0) - ;;@ ~lib/allocator/arena.ts:19:15 - (get_global $~lib/internal/allocator/MAX_SIZE_32) - ) - ;;@ ~lib/allocator/arena.ts:19:28 - (unreachable) - ) - ;;@ ~lib/allocator/arena.ts:20:4 - (set_local $1 - ;;@ ~lib/allocator/arena.ts:20:14 - (get_global $~lib/allocator/arena/offset) - ) - ;;@ ~lib/allocator/arena.ts:21:4 - (set_local $2 - ;;@ ~lib/allocator/arena.ts:21:17 - (i32.and - (i32.add - ;;@ ~lib/allocator/arena.ts:21:18 - (i32.add - (get_local $1) - ;;@ ~lib/allocator/arena.ts:21:24 + (i32.gt_u + (get_local $0) + ;;@ ~lib/allocator/arena.ts:18:13 + (get_global $~lib/internal/allocator/MAX_SIZE_32) + ) + ;;@ ~lib/allocator/arena.ts:18:26 + (unreachable) + ) + ;;@ ~lib/allocator/arena.ts:19:2 + (set_local $1 + ;;@ ~lib/allocator/arena.ts:19:12 + (get_global $~lib/allocator/arena/offset) + ) + ;;@ ~lib/allocator/arena.ts:20:2 + (set_local $4 + ;;@ ~lib/allocator/arena.ts:20:15 + (i32.and + (i32.add + ;;@ ~lib/allocator/arena.ts:20:16 + (i32.add + (get_local $1) + ;;@ ~lib/allocator/arena.ts:20:22 + (select + (tee_local $2 + ;;@ ~lib/allocator/arena.ts:20:33 (get_local $0) ) - ;;@ ~lib/allocator/arena.ts:21:31 - (get_global $~lib/internal/allocator/AL_MASK) - ) - ;;@ ~lib/allocator/arena.ts:21:42 - (i32.xor - ;;@ ~lib/allocator/arena.ts:21:43 - (get_global $~lib/internal/allocator/AL_MASK) - (i32.const -1) - ) - ) - ) - ;;@ ~lib/allocator/arena.ts:22:4 - (set_local $3 - ;;@ ~lib/allocator/arena.ts:22:29 - (current_memory) - ) - ;;@ ~lib/allocator/arena.ts:23:4 - (if - ;;@ ~lib/allocator/arena.ts:23:8 - (i32.gt_u - (get_local $2) - ;;@ ~lib/allocator/arena.ts:23:17 - (i32.shl - (get_local $3) - ;;@ ~lib/allocator/arena.ts:23:39 - (i32.const 16) - ) - ) - ;;@ ~lib/allocator/arena.ts:23:43 - (block - ;;@ ~lib/allocator/arena.ts:24:6 - (set_local $4 - ;;@ ~lib/allocator/arena.ts:24:24 - (i32.shr_u - (i32.and - ;;@ ~lib/allocator/arena.ts:24:25 - (i32.add - ;;@ ~lib/allocator/arena.ts:24:26 - (i32.sub - (get_local $2) - ;;@ ~lib/allocator/arena.ts:24:35 - (get_local $1) - ) - ;;@ ~lib/allocator/arena.ts:24:41 - (i32.const 65535) - ) - ;;@ ~lib/allocator/arena.ts:24:51 - (i32.xor - ;;@ ~lib/allocator/arena.ts:24:52 - (i32.const 65535) - (i32.const -1) - ) - ) - ;;@ ~lib/allocator/arena.ts:24:64 - (i32.const 16) + (tee_local $3 + ;;@ ~lib/allocator/arena.ts:20:39 + (i32.const 1) ) - ) - ;;@ ~lib/allocator/arena.ts:25:6 - (set_local $5 - ;;@ ~lib/allocator/arena.ts:25:24 - (select - (tee_local $5 - ;;@ ~lib/allocator/arena.ts:25:28 - (get_local $3) - ) - (tee_local $6 - ;;@ ~lib/allocator/arena.ts:25:41 - (get_local $4) - ) - (i32.gt_s - (get_local $5) - (get_local $6) - ) - ) - ) - ;;@ ~lib/allocator/arena.ts:26:6 - (if - ;;@ ~lib/allocator/arena.ts:26:10 - (i32.lt_s - ;;@ ~lib/allocator/arena.ts:26:17 - (grow_memory - ;;@ ~lib/allocator/arena.ts:26:22 - (get_local $5) - ) - ;;@ ~lib/allocator/arena.ts:26:37 - (i32.const 0) - ) - ;;@ ~lib/allocator/arena.ts:26:40 - (if - ;;@ ~lib/allocator/arena.ts:27:12 - (i32.lt_s - ;;@ ~lib/allocator/arena.ts:27:19 - (grow_memory - ;;@ ~lib/allocator/arena.ts:27:24 - (get_local $4) - ) - ;;@ ~lib/allocator/arena.ts:27:39 - (i32.const 0) - ) - ;;@ ~lib/allocator/arena.ts:27:42 - (unreachable) + (i32.gt_u + (get_local $2) + (get_local $3) ) ) ) + ;;@ ~lib/allocator/arena.ts:20:44 + (get_global $~lib/internal/allocator/AL_MASK) ) - ;;@ ~lib/allocator/arena.ts:32:4 - (set_global $~lib/allocator/arena/offset - ;;@ ~lib/allocator/arena.ts:32:13 - (get_local $2) - ) - ;;@ ~lib/allocator/arena.ts:33:11 - (return - (get_local $1) + ;;@ ~lib/allocator/arena.ts:20:55 + (i32.xor + ;;@ ~lib/allocator/arena.ts:20:56 + (get_global $~lib/internal/allocator/AL_MASK) + (i32.const -1) ) ) ) - ;;@ ~lib/allocator/arena.ts:35:9 - (i32.const 0) + ;;@ ~lib/allocator/arena.ts:21:2 + (set_local $5 + ;;@ ~lib/allocator/arena.ts:21:27 + (current_memory) + ) + ;;@ ~lib/allocator/arena.ts:22:2 + (if + ;;@ ~lib/allocator/arena.ts:22:6 + (i32.gt_u + (get_local $4) + ;;@ ~lib/allocator/arena.ts:22:15 + (i32.shl + (get_local $5) + ;;@ ~lib/allocator/arena.ts:22:37 + (i32.const 16) + ) + ) + ;;@ ~lib/allocator/arena.ts:22:41 + (block + ;;@ ~lib/allocator/arena.ts:23:4 + (set_local $2 + ;;@ ~lib/allocator/arena.ts:23:22 + (i32.shr_u + (i32.and + ;;@ ~lib/allocator/arena.ts:23:23 + (i32.add + ;;@ ~lib/allocator/arena.ts:23:24 + (i32.sub + (get_local $4) + ;;@ ~lib/allocator/arena.ts:23:33 + (get_local $1) + ) + ;;@ ~lib/allocator/arena.ts:23:39 + (i32.const 65535) + ) + ;;@ ~lib/allocator/arena.ts:23:49 + (i32.xor + ;;@ ~lib/allocator/arena.ts:23:50 + (i32.const 65535) + (i32.const -1) + ) + ) + ;;@ ~lib/allocator/arena.ts:23:62 + (i32.const 16) + ) + ) + ;;@ ~lib/allocator/arena.ts:24:4 + (set_local $3 + ;;@ ~lib/allocator/arena.ts:24:22 + (select + (tee_local $3 + ;;@ ~lib/allocator/arena.ts:24:26 + (get_local $5) + ) + (tee_local $6 + ;;@ ~lib/allocator/arena.ts:24:39 + (get_local $2) + ) + (i32.gt_s + (get_local $3) + (get_local $6) + ) + ) + ) + ;;@ ~lib/allocator/arena.ts:25:4 + (if + ;;@ ~lib/allocator/arena.ts:25:8 + (i32.lt_s + ;;@ ~lib/allocator/arena.ts:25:15 + (grow_memory + ;;@ ~lib/allocator/arena.ts:25:20 + (get_local $3) + ) + ;;@ ~lib/allocator/arena.ts:25:35 + (i32.const 0) + ) + ;;@ ~lib/allocator/arena.ts:25:38 + (if + ;;@ ~lib/allocator/arena.ts:26:10 + (i32.lt_s + ;;@ ~lib/allocator/arena.ts:26:17 + (grow_memory + ;;@ ~lib/allocator/arena.ts:26:22 + (get_local $2) + ) + ;;@ ~lib/allocator/arena.ts:26:37 + (i32.const 0) + ) + ;;@ ~lib/allocator/arena.ts:26:40 + (unreachable) + ) + ) + ) + ) + ;;@ ~lib/allocator/arena.ts:31:2 + (set_global $~lib/allocator/arena/offset + ;;@ ~lib/allocator/arena.ts:31:11 + (get_local $4) + ) + ;;@ ~lib/allocator/arena.ts:32:9 + (get_local $1) ) (func $~lib/memory/memory.allocate (; 2 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/memory.ts:35:4 + ;;@ ~lib/memory.ts:41:4 (return - ;;@ ~lib/memory.ts:35:45 + ;;@ ~lib/memory.ts:41:45 (call $~lib/allocator/arena/__memory_allocate - ;;@ ~lib/memory.ts:35:63 + ;;@ ~lib/memory.ts:41:63 (get_local $0) ) ) @@ -415,39 +419,40 @@ ) ) (func $~lib/internal/arraybuffer/computeSize (; 9 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/internal/arraybuffer.ts:17:77 + ;;@ ~lib/internal/arraybuffer.ts:15:77 (i32.shl - ;;@ ~lib/internal/arraybuffer.ts:17:9 + ;;@ ~lib/internal/arraybuffer.ts:15:9 (i32.const 1) - ;;@ ~lib/internal/arraybuffer.ts:17:21 + ;;@ ~lib/internal/arraybuffer.ts:15:21 (i32.sub - ;;@ ~lib/internal/arraybuffer.ts:17:29 + ;;@ ~lib/internal/arraybuffer.ts:15:29 (i32.const 32) - ;;@ ~lib/internal/arraybuffer.ts:17:39 + ;;@ ~lib/internal/arraybuffer.ts:15:39 (i32.clz - ;;@ ~lib/internal/arraybuffer.ts:17:48 + ;;@ ~lib/internal/arraybuffer.ts:15:48 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/internal/arraybuffer.ts:17:61 + ;;@ ~lib/internal/arraybuffer.ts:15:61 (get_global $~lib/internal/arraybuffer/HEADER_SIZE) ) - ;;@ ~lib/internal/arraybuffer.ts:17:75 + ;;@ ~lib/internal/arraybuffer.ts:15:75 (i32.const 1) ) ) ) ) ) - (func $~lib/internal/arraybuffer/allocUnsafe (; 10 ;) (type $ii) (param $0 i32) (result i32) + (func $~lib/internal/arraybuffer/allocateUnsafe (; 10 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) - ;;@ ~lib/internal/arraybuffer.ts:22:2 + (local $2 i32) + ;;@ ~lib/internal/arraybuffer.ts:23:2 (if (i32.eqz - ;;@ ~lib/internal/arraybuffer.ts:22:9 + ;;@ ~lib/internal/arraybuffer.ts:23:9 (i32.le_u (get_local $0) - ;;@ ~lib/internal/arraybuffer.ts:22:28 + ;;@ ~lib/internal/arraybuffer.ts:23:28 (get_global $~lib/internal/arraybuffer/MAX_BLENGTH) ) ) @@ -455,546 +460,557 @@ (call $~lib/env/abort (i32.const 0) (i32.const 40) - (i32.const 22) + (i32.const 23) (i32.const 2) ) (unreachable) ) ) - ;;@ ~lib/internal/arraybuffer.ts:23:2 + ;;@ ~lib/internal/arraybuffer.ts:25:2 (set_local $1 - ;;@ ~lib/internal/arraybuffer.ts:23:22 - (call $~lib/memory/memory.allocate - ;;@ ~lib/internal/arraybuffer.ts:23:31 - (call $~lib/internal/arraybuffer/computeSize - ;;@ ~lib/internal/arraybuffer.ts:23:43 - (get_local $0) + ;;@ ~lib/internal/arraybuffer.ts:28:20 + (block $~lib/memory/memory.allocate|inlined.0 (result i32) + (set_local $2 + ;;@ ~lib/internal/arraybuffer.ts:28:29 + (call $~lib/internal/arraybuffer/computeSize + ;;@ ~lib/internal/arraybuffer.ts:28:41 + (get_local $0) + ) + ) + ;;@ ~lib/memory.ts:41:4 + (br $~lib/memory/memory.allocate|inlined.0 + ;;@ ~lib/memory.ts:41:45 + (call $~lib/allocator/arena/__memory_allocate + ;;@ ~lib/memory.ts:41:63 + (get_local $2) + ) ) ) ) - ;;@ ~lib/internal/arraybuffer.ts:24:2 + ;;@ ~lib/internal/arraybuffer.ts:30:2 (i32.store - ;;@ ~lib/internal/arraybuffer.ts:24:13 + ;;@ ~lib/internal/arraybuffer.ts:30:13 (get_local $1) - ;;@ ~lib/internal/arraybuffer.ts:24:21 + ;;@ ~lib/internal/arraybuffer.ts:30:21 (get_local $0) ) - ;;@ ~lib/internal/arraybuffer.ts:25:39 + ;;@ ~lib/internal/arraybuffer.ts:31:39 (get_local $1) ) - (func $~lib/memory/memset (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/internal/memory/memset (; 11 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) (local $5 i64) - ;;@ ~lib/memory.ts:242:2 + ;;@ ~lib/internal/memory.ts:191:2 (if - ;;@ ~lib/memory.ts:242:6 + ;;@ ~lib/internal/memory.ts:191:6 (i32.eqz - ;;@ ~lib/memory.ts:242:7 + ;;@ ~lib/internal/memory.ts:191:7 (get_local $2) ) - ;;@ ~lib/memory.ts:242:10 + ;;@ ~lib/internal/memory.ts:191:10 (return) ) - ;;@ ~lib/memory.ts:243:2 + ;;@ ~lib/internal/memory.ts:192:2 (i32.store8 - ;;@ ~lib/memory.ts:243:12 + ;;@ ~lib/internal/memory.ts:192:12 (get_local $0) - ;;@ ~lib/memory.ts:243:18 + ;;@ ~lib/internal/memory.ts:192:18 (get_local $1) ) - ;;@ ~lib/memory.ts:244:2 + ;;@ ~lib/internal/memory.ts:193:2 (i32.store8 - ;;@ ~lib/memory.ts:244:12 + ;;@ ~lib/internal/memory.ts:193:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:244:19 + ;;@ ~lib/internal/memory.ts:193:19 (get_local $2) ) - ;;@ ~lib/memory.ts:244:23 + ;;@ ~lib/internal/memory.ts:193:23 (i32.const 1) ) - ;;@ ~lib/memory.ts:244:26 + ;;@ ~lib/internal/memory.ts:193:26 (get_local $1) ) - ;;@ ~lib/memory.ts:245:2 + ;;@ ~lib/internal/memory.ts:194:2 (if - ;;@ ~lib/memory.ts:245:6 + ;;@ ~lib/internal/memory.ts:194:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:245:11 + ;;@ ~lib/internal/memory.ts:194:11 (i32.const 2) ) - ;;@ ~lib/memory.ts:245:14 + ;;@ ~lib/internal/memory.ts:194:14 (return) ) - ;;@ ~lib/memory.ts:247:2 + ;;@ ~lib/internal/memory.ts:196:2 (i32.store8 - ;;@ ~lib/memory.ts:247:12 + ;;@ ~lib/internal/memory.ts:196:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:247:19 + ;;@ ~lib/internal/memory.ts:196:19 (i32.const 1) ) - ;;@ ~lib/memory.ts:247:22 + ;;@ ~lib/internal/memory.ts:196:22 (get_local $1) ) - ;;@ ~lib/memory.ts:248:2 + ;;@ ~lib/internal/memory.ts:197:2 (i32.store8 - ;;@ ~lib/memory.ts:248:12 + ;;@ ~lib/internal/memory.ts:197:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:248:19 + ;;@ ~lib/internal/memory.ts:197:19 (i32.const 2) ) - ;;@ ~lib/memory.ts:248:22 + ;;@ ~lib/internal/memory.ts:197:22 (get_local $1) ) - ;;@ ~lib/memory.ts:249:2 + ;;@ ~lib/internal/memory.ts:198:2 (i32.store8 - ;;@ ~lib/memory.ts:249:12 + ;;@ ~lib/internal/memory.ts:198:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:249:19 + ;;@ ~lib/internal/memory.ts:198:19 (get_local $2) ) - ;;@ ~lib/memory.ts:249:23 + ;;@ ~lib/internal/memory.ts:198:23 (i32.const 2) ) - ;;@ ~lib/memory.ts:249:26 + ;;@ ~lib/internal/memory.ts:198:26 (get_local $1) ) - ;;@ ~lib/memory.ts:250:2 + ;;@ ~lib/internal/memory.ts:199:2 (i32.store8 - ;;@ ~lib/memory.ts:250:12 + ;;@ ~lib/internal/memory.ts:199:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:250:19 + ;;@ ~lib/internal/memory.ts:199:19 (get_local $2) ) - ;;@ ~lib/memory.ts:250:23 + ;;@ ~lib/internal/memory.ts:199:23 (i32.const 3) ) - ;;@ ~lib/memory.ts:250:26 + ;;@ ~lib/internal/memory.ts:199:26 (get_local $1) ) - ;;@ ~lib/memory.ts:251:2 + ;;@ ~lib/internal/memory.ts:200:2 (if - ;;@ ~lib/memory.ts:251:6 + ;;@ ~lib/internal/memory.ts:200:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:251:11 + ;;@ ~lib/internal/memory.ts:200:11 (i32.const 6) ) - ;;@ ~lib/memory.ts:251:14 + ;;@ ~lib/internal/memory.ts:200:14 (return) ) - ;;@ ~lib/memory.ts:252:2 + ;;@ ~lib/internal/memory.ts:201:2 (i32.store8 - ;;@ ~lib/memory.ts:252:12 + ;;@ ~lib/internal/memory.ts:201:12 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:252:19 + ;;@ ~lib/internal/memory.ts:201:19 (i32.const 3) ) - ;;@ ~lib/memory.ts:252:22 + ;;@ ~lib/internal/memory.ts:201:22 (get_local $1) ) - ;;@ ~lib/memory.ts:253:2 + ;;@ ~lib/internal/memory.ts:202:2 (i32.store8 - ;;@ ~lib/memory.ts:253:12 + ;;@ ~lib/internal/memory.ts:202:12 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:253:19 + ;;@ ~lib/internal/memory.ts:202:19 (get_local $2) ) - ;;@ ~lib/memory.ts:253:23 + ;;@ ~lib/internal/memory.ts:202:23 (i32.const 4) ) - ;;@ ~lib/memory.ts:253:26 + ;;@ ~lib/internal/memory.ts:202:26 (get_local $1) ) - ;;@ ~lib/memory.ts:254:2 + ;;@ ~lib/internal/memory.ts:203:2 (if - ;;@ ~lib/memory.ts:254:6 + ;;@ ~lib/internal/memory.ts:203:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:254:11 + ;;@ ~lib/internal/memory.ts:203:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:254:14 + ;;@ ~lib/internal/memory.ts:203:14 (return) ) - ;;@ ~lib/memory.ts:257:2 + ;;@ ~lib/internal/memory.ts:206:2 (set_local $3 - ;;@ ~lib/memory.ts:257:17 + ;;@ ~lib/internal/memory.ts:206:17 (i32.and (i32.sub (i32.const 0) - ;;@ ~lib/memory.ts:257:18 + ;;@ ~lib/internal/memory.ts:206:18 (get_local $0) ) - ;;@ ~lib/memory.ts:257:25 + ;;@ ~lib/internal/memory.ts:206:25 (i32.const 3) ) ) - ;;@ ~lib/memory.ts:258:2 + ;;@ ~lib/internal/memory.ts:207:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:258:10 + ;;@ ~lib/internal/memory.ts:207:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:259:2 + ;;@ ~lib/internal/memory.ts:208:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:259:7 + ;;@ ~lib/internal/memory.ts:208:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:260:2 + ;;@ ~lib/internal/memory.ts:209:2 (set_local $2 (i32.and (get_local $2) - ;;@ ~lib/memory.ts:260:7 + ;;@ ~lib/internal/memory.ts:209:7 (i32.const -4) ) ) - ;;@ ~lib/memory.ts:262:2 + ;;@ ~lib/internal/memory.ts:211:2 (set_local $4 - ;;@ ~lib/memory.ts:262:17 + ;;@ ~lib/internal/memory.ts:211:17 (i32.mul (i32.div_u (i32.const -1) - ;;@ ~lib/memory.ts:262:27 + ;;@ ~lib/internal/memory.ts:211:27 (i32.const 255) ) (i32.and - ;;@ ~lib/memory.ts:262:33 + ;;@ ~lib/internal/memory.ts:211:33 (get_local $1) (i32.const 255) ) ) ) - ;;@ ~lib/memory.ts:265:2 + ;;@ ~lib/internal/memory.ts:214:2 (i32.store - ;;@ ~lib/memory.ts:265:13 + ;;@ ~lib/internal/memory.ts:214:13 (get_local $0) - ;;@ ~lib/memory.ts:265:19 + ;;@ ~lib/internal/memory.ts:214:19 (get_local $4) ) - ;;@ ~lib/memory.ts:266:2 + ;;@ ~lib/internal/memory.ts:215:2 (i32.store - ;;@ ~lib/memory.ts:266:13 + ;;@ ~lib/internal/memory.ts:215:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:266:20 + ;;@ ~lib/internal/memory.ts:215:20 (get_local $2) ) - ;;@ ~lib/memory.ts:266:24 + ;;@ ~lib/internal/memory.ts:215:24 (i32.const 4) ) - ;;@ ~lib/memory.ts:266:27 + ;;@ ~lib/internal/memory.ts:215:27 (get_local $4) ) - ;;@ ~lib/memory.ts:267:2 + ;;@ ~lib/internal/memory.ts:216:2 (if - ;;@ ~lib/memory.ts:267:6 + ;;@ ~lib/internal/memory.ts:216:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:267:11 + ;;@ ~lib/internal/memory.ts:216:11 (i32.const 8) ) - ;;@ ~lib/memory.ts:267:14 + ;;@ ~lib/internal/memory.ts:216:14 (return) ) - ;;@ ~lib/memory.ts:268:2 + ;;@ ~lib/internal/memory.ts:217:2 (i32.store - ;;@ ~lib/memory.ts:268:13 + ;;@ ~lib/internal/memory.ts:217:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:268:20 + ;;@ ~lib/internal/memory.ts:217:20 (i32.const 4) ) - ;;@ ~lib/memory.ts:268:23 + ;;@ ~lib/internal/memory.ts:217:23 (get_local $4) ) - ;;@ ~lib/memory.ts:269:2 + ;;@ ~lib/internal/memory.ts:218:2 (i32.store - ;;@ ~lib/memory.ts:269:13 + ;;@ ~lib/internal/memory.ts:218:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:269:20 + ;;@ ~lib/internal/memory.ts:218:20 (i32.const 8) ) - ;;@ ~lib/memory.ts:269:23 + ;;@ ~lib/internal/memory.ts:218:23 (get_local $4) ) - ;;@ ~lib/memory.ts:270:2 + ;;@ ~lib/internal/memory.ts:219:2 (i32.store - ;;@ ~lib/memory.ts:270:13 + ;;@ ~lib/internal/memory.ts:219:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:270:20 + ;;@ ~lib/internal/memory.ts:219:20 (get_local $2) ) - ;;@ ~lib/memory.ts:270:24 + ;;@ ~lib/internal/memory.ts:219:24 (i32.const 12) ) - ;;@ ~lib/memory.ts:270:28 + ;;@ ~lib/internal/memory.ts:219:28 (get_local $4) ) - ;;@ ~lib/memory.ts:271:2 + ;;@ ~lib/internal/memory.ts:220:2 (i32.store - ;;@ ~lib/memory.ts:271:13 + ;;@ ~lib/internal/memory.ts:220:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:271:20 + ;;@ ~lib/internal/memory.ts:220:20 (get_local $2) ) - ;;@ ~lib/memory.ts:271:24 + ;;@ ~lib/internal/memory.ts:220:24 (i32.const 8) ) - ;;@ ~lib/memory.ts:271:27 + ;;@ ~lib/internal/memory.ts:220:27 (get_local $4) ) - ;;@ ~lib/memory.ts:272:2 + ;;@ ~lib/internal/memory.ts:221:2 (if - ;;@ ~lib/memory.ts:272:6 + ;;@ ~lib/internal/memory.ts:221:6 (i32.le_u (get_local $2) - ;;@ ~lib/memory.ts:272:11 + ;;@ ~lib/internal/memory.ts:221:11 (i32.const 24) ) - ;;@ ~lib/memory.ts:272:15 + ;;@ ~lib/internal/memory.ts:221:15 (return) ) - ;;@ ~lib/memory.ts:273:2 + ;;@ ~lib/internal/memory.ts:222:2 (i32.store - ;;@ ~lib/memory.ts:273:13 + ;;@ ~lib/internal/memory.ts:222:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:273:20 + ;;@ ~lib/internal/memory.ts:222:20 (i32.const 12) ) - ;;@ ~lib/memory.ts:273:24 + ;;@ ~lib/internal/memory.ts:222:24 (get_local $4) ) - ;;@ ~lib/memory.ts:274:2 + ;;@ ~lib/internal/memory.ts:223:2 (i32.store - ;;@ ~lib/memory.ts:274:13 + ;;@ ~lib/internal/memory.ts:223:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:274:20 + ;;@ ~lib/internal/memory.ts:223:20 (i32.const 16) ) - ;;@ ~lib/memory.ts:274:24 + ;;@ ~lib/internal/memory.ts:223:24 (get_local $4) ) - ;;@ ~lib/memory.ts:275:2 + ;;@ ~lib/internal/memory.ts:224:2 (i32.store - ;;@ ~lib/memory.ts:275:13 + ;;@ ~lib/internal/memory.ts:224:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:275:20 + ;;@ ~lib/internal/memory.ts:224:20 (i32.const 20) ) - ;;@ ~lib/memory.ts:275:24 + ;;@ ~lib/internal/memory.ts:224:24 (get_local $4) ) - ;;@ ~lib/memory.ts:276:2 + ;;@ ~lib/internal/memory.ts:225:2 (i32.store - ;;@ ~lib/memory.ts:276:13 + ;;@ ~lib/internal/memory.ts:225:13 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:276:20 + ;;@ ~lib/internal/memory.ts:225:20 (i32.const 24) ) - ;;@ ~lib/memory.ts:276:24 + ;;@ ~lib/internal/memory.ts:225:24 (get_local $4) ) - ;;@ ~lib/memory.ts:277:2 + ;;@ ~lib/internal/memory.ts:226:2 (i32.store - ;;@ ~lib/memory.ts:277:13 + ;;@ ~lib/internal/memory.ts:226:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:277:20 + ;;@ ~lib/internal/memory.ts:226:20 (get_local $2) ) - ;;@ ~lib/memory.ts:277:24 + ;;@ ~lib/internal/memory.ts:226:24 (i32.const 28) ) - ;;@ ~lib/memory.ts:277:28 + ;;@ ~lib/internal/memory.ts:226:28 (get_local $4) ) - ;;@ ~lib/memory.ts:278:2 + ;;@ ~lib/internal/memory.ts:227:2 (i32.store - ;;@ ~lib/memory.ts:278:13 + ;;@ ~lib/internal/memory.ts:227:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:278:20 + ;;@ ~lib/internal/memory.ts:227:20 (get_local $2) ) - ;;@ ~lib/memory.ts:278:24 + ;;@ ~lib/internal/memory.ts:227:24 (i32.const 24) ) - ;;@ ~lib/memory.ts:278:28 + ;;@ ~lib/internal/memory.ts:227:28 (get_local $4) ) - ;;@ ~lib/memory.ts:279:2 + ;;@ ~lib/internal/memory.ts:228:2 (i32.store - ;;@ ~lib/memory.ts:279:13 + ;;@ ~lib/internal/memory.ts:228:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:279:20 + ;;@ ~lib/internal/memory.ts:228:20 (get_local $2) ) - ;;@ ~lib/memory.ts:279:24 + ;;@ ~lib/internal/memory.ts:228:24 (i32.const 20) ) - ;;@ ~lib/memory.ts:279:28 + ;;@ ~lib/internal/memory.ts:228:28 (get_local $4) ) - ;;@ ~lib/memory.ts:280:2 + ;;@ ~lib/internal/memory.ts:229:2 (i32.store - ;;@ ~lib/memory.ts:280:13 + ;;@ ~lib/internal/memory.ts:229:13 (i32.sub (i32.add (get_local $0) - ;;@ ~lib/memory.ts:280:20 + ;;@ ~lib/internal/memory.ts:229:20 (get_local $2) ) - ;;@ ~lib/memory.ts:280:24 + ;;@ ~lib/internal/memory.ts:229:24 (i32.const 16) ) - ;;@ ~lib/memory.ts:280:28 + ;;@ ~lib/internal/memory.ts:229:28 (get_local $4) ) - ;;@ ~lib/memory.ts:283:2 + ;;@ ~lib/internal/memory.ts:232:2 (set_local $3 - ;;@ ~lib/memory.ts:283:6 + ;;@ ~lib/internal/memory.ts:232:6 (i32.add (i32.const 24) - ;;@ ~lib/memory.ts:283:11 + ;;@ ~lib/internal/memory.ts:232:11 (i32.and - ;;@ ~lib/memory.ts:283:12 + ;;@ ~lib/internal/memory.ts:232:12 (get_local $0) - ;;@ ~lib/memory.ts:283:19 + ;;@ ~lib/internal/memory.ts:232:19 (i32.const 4) ) ) ) - ;;@ ~lib/memory.ts:284:2 + ;;@ ~lib/internal/memory.ts:233:2 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:284:10 + ;;@ ~lib/internal/memory.ts:233:10 (get_local $3) ) ) - ;;@ ~lib/memory.ts:285:2 + ;;@ ~lib/internal/memory.ts:234:2 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:285:7 + ;;@ ~lib/internal/memory.ts:234:7 (get_local $3) ) ) - ;;@ ~lib/memory.ts:288:2 + ;;@ ~lib/internal/memory.ts:237:2 (set_local $5 - ;;@ ~lib/memory.ts:288:17 + ;;@ ~lib/internal/memory.ts:237:17 (i64.or (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:288:28 + ;;@ ~lib/internal/memory.ts:237:28 (i64.shl - ;;@ ~lib/memory.ts:288:29 + ;;@ ~lib/internal/memory.ts:237:29 (i64.extend_u/i32 (get_local $4) ) - ;;@ ~lib/memory.ts:288:41 + ;;@ ~lib/internal/memory.ts:237:41 (i64.const 32) ) ) ) - ;;@ ~lib/memory.ts:289:2 + ;;@ ~lib/internal/memory.ts:238:2 (block $break|0 (loop $continue|0 (if - ;;@ ~lib/memory.ts:289:9 + ;;@ ~lib/internal/memory.ts:238:9 (i32.ge_u (get_local $2) - ;;@ ~lib/memory.ts:289:14 + ;;@ ~lib/internal/memory.ts:238:14 (i32.const 32) ) (block + ;;@ ~lib/internal/memory.ts:238:18 (block - ;;@ ~lib/memory.ts:290:4 + ;;@ ~lib/internal/memory.ts:239:4 (i64.store - ;;@ ~lib/memory.ts:290:15 + ;;@ ~lib/internal/memory.ts:239:15 (get_local $0) - ;;@ ~lib/memory.ts:290:21 + ;;@ ~lib/internal/memory.ts:239:21 (get_local $5) ) - ;;@ ~lib/memory.ts:291:4 + ;;@ ~lib/internal/memory.ts:240:4 (i64.store - ;;@ ~lib/memory.ts:291:15 + ;;@ ~lib/internal/memory.ts:240:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:291:22 + ;;@ ~lib/internal/memory.ts:240:22 (i32.const 8) ) - ;;@ ~lib/memory.ts:291:25 + ;;@ ~lib/internal/memory.ts:240:25 (get_local $5) ) - ;;@ ~lib/memory.ts:292:4 + ;;@ ~lib/internal/memory.ts:241:4 (i64.store - ;;@ ~lib/memory.ts:292:15 + ;;@ ~lib/internal/memory.ts:241:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:292:22 + ;;@ ~lib/internal/memory.ts:241:22 (i32.const 16) ) - ;;@ ~lib/memory.ts:292:26 + ;;@ ~lib/internal/memory.ts:241:26 (get_local $5) ) - ;;@ ~lib/memory.ts:293:4 + ;;@ ~lib/internal/memory.ts:242:4 (i64.store - ;;@ ~lib/memory.ts:293:15 + ;;@ ~lib/internal/memory.ts:242:15 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:293:22 + ;;@ ~lib/internal/memory.ts:242:22 (i32.const 24) ) - ;;@ ~lib/memory.ts:293:26 + ;;@ ~lib/internal/memory.ts:242:26 (get_local $5) ) - ;;@ ~lib/memory.ts:294:4 + ;;@ ~lib/internal/memory.ts:243:4 (set_local $2 (i32.sub (get_local $2) - ;;@ ~lib/memory.ts:294:9 + ;;@ ~lib/internal/memory.ts:243:9 (i32.const 32) ) ) - ;;@ ~lib/memory.ts:295:4 + ;;@ ~lib/internal/memory.ts:244:4 (set_local $0 (i32.add (get_local $0) - ;;@ ~lib/memory.ts:295:12 + ;;@ ~lib/internal/memory.ts:244:12 (i32.const 32) ) ) @@ -1005,21 +1021,11 @@ ) ) ) - (func $~lib/memory/memory.fill (; 12 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) - ;;@ ~lib/memory.ts:9:4 - (call $~lib/memory/memset - ;;@ ~lib/memory.ts:9:11 - (get_local $0) - ;;@ ~lib/memory.ts:9:17 - (get_local $1) - ;;@ ~lib/memory.ts:9:20 - (get_local $2) - ) - ) - (func $~lib/array/Array#constructor (; 13 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#constructor (; 12 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) ;;@ ~lib/array.ts:23:4 (if ;;@ ~lib/array.ts:23:8 @@ -1051,8 +1057,8 @@ ;;@ ~lib/array.ts:25:4 (set_local $3 ;;@ ~lib/array.ts:25:17 - (call $~lib/internal/arraybuffer/allocUnsafe - ;;@ ~lib/array.ts:25:29 + (call $~lib/internal/arraybuffer/allocateUnsafe + ;;@ ~lib/array.ts:25:32 (get_local $2) ) ) @@ -1092,127 +1098,131 @@ (get_local $1) ) ;;@ ~lib/array.ts:28:11 - (call $~lib/memory/memory.fill - ;;@ ~lib/array.ts:29:6 - (i32.add - (get_local $3) - ;;@ ~lib/array.ts:29:34 - (get_global $~lib/internal/arraybuffer/HEADER_SIZE) + (block $~lib/memory/memory.fill|inlined.0 + (set_local $4 + ;;@ ~lib/array.ts:29:6 + (i32.add + (get_local $3) + ;;@ ~lib/array.ts:29:34 + (get_global $~lib/internal/arraybuffer/HEADER_SIZE) + ) + ) + (set_local $5 + ;;@ ~lib/array.ts:30:6 + (i32.const 0) + ) + ;;@ ~lib/memory.ts:15:4 + (call $~lib/internal/memory/memset + ;;@ ~lib/memory.ts:15:11 + (get_local $4) + ;;@ ~lib/memory.ts:15:17 + (get_local $5) + ;;@ ~lib/memory.ts:15:20 + (get_local $2) ) - ;;@ ~lib/array.ts:30:6 - (i32.const 0) - ;;@ ~lib/array.ts:31:6 - (get_local $2) ) (get_local $0) ) - (func $~lib/array/Array#__unchecked_set (; 14 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) + (func $~lib/array/Array#__unchecked_set (; 13 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - ;;@ ~lib/array.ts:96:4 + ;;@ ~lib/array.ts:98:4 (block $~lib/internal/arraybuffer/storeUnsafe|inlined.0 (set_local $3 - ;;@ ~lib/array.ts:96:21 + ;;@ ~lib/array.ts:98:21 (i32.load (get_local $0) ) ) - ;;@ ~lib/internal/arraybuffer.ts:69:2 + ;;@ ~lib/internal/arraybuffer.ts:72:2 (i32.store offset=8 - ;;@ ~lib/internal/arraybuffer.ts:69:11 + ;;@ ~lib/internal/arraybuffer.ts:72:11 (i32.add (get_local $3) - ;;@ ~lib/internal/arraybuffer.ts:69:39 + ;;@ ~lib/internal/arraybuffer.ts:72:39 (i32.shl - ;;@ ~lib/internal/arraybuffer.ts:69:40 + ;;@ ~lib/internal/arraybuffer.ts:72:40 (get_local $1) - ;;@ ~lib/internal/arraybuffer.ts:69:56 + ;;@ ~lib/internal/arraybuffer.ts:72:56 (i32.const 2) ) ) - ;;@ ~lib/internal/arraybuffer.ts:69:71 + ;;@ ~lib/internal/arraybuffer.ts:72:71 (get_local $2) ) ) ) - (func $~lib/array/Array#get:length (; 15 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/array.ts:36:16 - (i32.load offset=4 - ;;@ ~lib/array.ts:36:11 - (get_local $0) - ) - ) - (func $~lib/array/Array#__unchecked_get (; 16 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__unchecked_get (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - ;;@ ~lib/array.ts:77:46 + ;;@ ~lib/array.ts:78:46 (block $~lib/internal/arraybuffer/loadUnsafe|inlined.0 (result i32) (set_local $2 - ;;@ ~lib/array.ts:77:27 + ;;@ ~lib/array.ts:78:27 (i32.load (get_local $0) ) ) - ;;@ ~lib/internal/arraybuffer.ts:64:91 + ;;@ ~lib/internal/arraybuffer.ts:68:91 (i32.load offset=8 - ;;@ ~lib/internal/arraybuffer.ts:64:20 + ;;@ ~lib/internal/arraybuffer.ts:68:20 (i32.add (get_local $2) - ;;@ ~lib/internal/arraybuffer.ts:64:48 + ;;@ ~lib/internal/arraybuffer.ts:68:48 (i32.shl - ;;@ ~lib/internal/arraybuffer.ts:64:49 + ;;@ ~lib/internal/arraybuffer.ts:68:49 (get_local $1) - ;;@ ~lib/internal/arraybuffer.ts:64:65 + ;;@ ~lib/internal/arraybuffer.ts:68:65 (i32.const 2) ) ) ) ) ) - (func $~lib/array/Array#__get (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $~lib/array/Array#__get (; 15 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) - ;;@ ~lib/array.ts:69:4 + ;;@ ~lib/array.ts:70:4 (set_local $2 - ;;@ ~lib/array.ts:69:17 + ;;@ ~lib/array.ts:70:17 (i32.load (get_local $0) ) ) - ;;@ ~lib/array.ts:72:23 + ;;@ ~lib/array.ts:73:23 (if (result i32) - ;;@ ~lib/array.ts:70:11 + ;;@ ~lib/array.ts:71:11 (i32.lt_u (get_local $1) - ;;@ ~lib/array.ts:70:24 + ;;@ ~lib/array.ts:71:24 (i32.shr_u - ;;@ ~lib/array.ts:70:30 + ;;@ ~lib/array.ts:71:30 (i32.load (get_local $2) ) - ;;@ ~lib/array.ts:70:52 + ;;@ ~lib/array.ts:71:52 (i32.const 2) ) ) - ;;@ ~lib/array.ts:71:8 + ;;@ ~lib/array.ts:72:8 (block $~lib/internal/arraybuffer/loadUnsafe|inlined.1 (result i32) - ;;@ ~lib/internal/arraybuffer.ts:64:91 + ;;@ ~lib/internal/arraybuffer.ts:68:91 (i32.load offset=8 - ;;@ ~lib/internal/arraybuffer.ts:64:20 + ;;@ ~lib/internal/arraybuffer.ts:68:20 (i32.add (get_local $2) - ;;@ ~lib/internal/arraybuffer.ts:64:48 + ;;@ ~lib/internal/arraybuffer.ts:68:48 (i32.shl - ;;@ ~lib/internal/arraybuffer.ts:64:49 + ;;@ ~lib/internal/arraybuffer.ts:68:49 (get_local $1) - ;;@ ~lib/internal/arraybuffer.ts:64:65 + ;;@ ~lib/internal/arraybuffer.ts:68:65 (i32.const 2) ) ) ) ) - ;;@ ~lib/array.ts:72:8 + ;;@ ~lib/array.ts:73:8 (unreachable) ) ) - (func $assembly/index/Body#offsetMomentum (; 18 ;) (type $iFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) + (func $assembly/index/Body#offsetMomentum (; 16 ;) (type $iFFFi) (param $0 i32) (param $1 f64) (param $2 f64) (param $3 f64) (result i32) ;;@ assembly/index.ts:24:4 (f64.store offset=24 (get_local $0) @@ -1255,7 +1265,7 @@ ;;@ assembly/index.ts:27:11 (get_local $0) ) - (func $assembly/index/NBodySystem#constructor (; 19 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (func $assembly/index/NBodySystem#constructor (; 17 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 f64) (local $3 f64) (local $4 f64) @@ -1281,8 +1291,12 @@ ;;@ assembly/index.ts:91:4 (set_local $5 ;;@ assembly/index.ts:91:15 - (call $~lib/array/Array#get:length - (get_local $1) + (block $~lib/array/Array#get:length|inlined.0 (result i32) + ;;@ ~lib/array.ts:37:16 + (i32.load offset=4 + ;;@ ~lib/array.ts:37:11 + (get_local $1) + ) ) ) ;;@ assembly/index.ts:92:4 @@ -1414,7 +1428,7 @@ ) ) ) - (func $assembly/index/init (; 20 ;) (type $v) + (func $assembly/index/init (; 18 ;) (type $v) (local $0 i32) ;;@ assembly/index.ts:189:2 (set_global $assembly/index/system @@ -1464,7 +1478,7 @@ ) ) ) - (func $assembly/index/NBodySystem#advance (; 21 ;) (type $iFv) (param $0 i32) (param $1 f64) + (func $assembly/index/NBodySystem#advance (; 19 ;) (type $iFv) (param $0 i32) (param $1 f64) (local $2 i32) (local $3 i32) (local $4 i32) @@ -1496,8 +1510,12 @@ ;;@ assembly/index.ts:104:4 (set_local $3 ;;@ assembly/index.ts:104:20 - (call $~lib/array/Array#get:length - (get_local $2) + (block $~lib/array/Array#get:length|inlined.1 (result i32) + ;;@ ~lib/array.ts:37:16 + (i32.load offset=4 + ;;@ ~lib/array.ts:37:11 + (get_local $2) + ) ) ) ;;@ assembly/index.ts:107:4 @@ -1675,9 +1693,9 @@ (set_local $19 ;;@ assembly/index.ts:129:23 (block $~lib/math/NativeMath.sqrt|inlined.0 (result f64) - ;;@ ~lib/math.ts:1076:30 + ;;@ ~lib/math.ts:1031:30 (f64.sqrt - ;;@ ~lib/math.ts:1076:29 + ;;@ ~lib/math.ts:1031:29 (get_local $18) ) ) @@ -1885,7 +1903,7 @@ ) ) ) - (func $assembly/index/NBodySystem#energy (; 22 ;) (type $iF) (param $0 i32) (result f64) + (func $assembly/index/NBodySystem#energy (; 20 ;) (type $iF) (param $0 i32) (result f64) (local $1 f64) (local $2 i32) (local $3 i32) @@ -1918,6 +1936,7 @@ ) ;;@ assembly/index.ts:158:4 (block $break|0 + ;;@ assembly/index.ts:158:9 (block (set_local $3 ;;@ assembly/index.ts:158:22 @@ -1925,8 +1944,12 @@ ) (set_local $4 ;;@ assembly/index.ts:158:37 - (call $~lib/array/Array#get:length - (get_local $2) + (block $~lib/array/Array#get:length|inlined.2 (result i32) + ;;@ ~lib/array.ts:37:16 + (i32.load offset=4 + ;;@ ~lib/array.ts:37:11 + (get_local $2) + ) ) ) ) @@ -2134,9 +2157,9 @@ ) ) ) - ;;@ ~lib/math.ts:1076:30 + ;;@ ~lib/math.ts:1031:30 (f64.sqrt - ;;@ ~lib/math.ts:1076:29 + ;;@ ~lib/math.ts:1031:29 (get_local $18) ) ) @@ -2186,7 +2209,7 @@ ;;@ assembly/index.ts:182:11 (get_local $1) ) - (func $assembly/index/step (; 23 ;) (type $F) (result f64) + (func $assembly/index/step (; 21 ;) (type $F) (result f64) ;;@ assembly/index.ts:199:9 (call $assembly/index/NBodySystem#advance ;;@ assembly/index.ts:199:2 @@ -2200,7 +2223,7 @@ (get_global $assembly/index/system) ) ) - (func $assembly/index/bench (; 24 ;) (type $iv) (param $0 i32) + (func $assembly/index/bench (; 22 ;) (type $iv) (param $0 i32) (local $1 i32) ;;@ assembly/index.ts:204:2 (block $break|0 @@ -2239,7 +2262,7 @@ ) ) ) - (func $assembly/index/getBody (; 25 ;) (type $ii) (param $0 i32) (result i32) + (func $assembly/index/getBody (; 23 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) ;;@ assembly/index.ts:208:2 (set_local $1 @@ -2254,9 +2277,12 @@ (i32.lt_u (get_local $0) ;;@ assembly/index.ts:209:22 - (call $~lib/array/Array#get:length - ;;@ assembly/index.ts:209:27 - (get_local $1) + (block $~lib/array/Array#get:length|inlined.4 (result i32) + ;;@ ~lib/array.ts:37:16 + (i32.load offset=4 + ;;@ ~lib/array.ts:37:11 + (get_local $1) + ) ) ) ;;@ assembly/index.ts:209:43 @@ -2269,7 +2295,7 @@ (i32.const 0) ) ) - (func $start (; 26 ;) (type $v) + (func $start (; 24 ;) (type $v) (set_global $~lib/allocator/arena/startOffset ;;@ ~lib/allocator/arena.ts:12:25 (i32.and @@ -2293,4 +2319,6 @@ ) (nop) ) + (func $null (; 25 ;) (type $v) + ) ) diff --git a/examples/n-body/tests/index.js b/examples/n-body/tests/index.js index 9a7cebbf..43170966 100644 --- a/examples/n-body/tests/index.js +++ b/examples/n-body/tests/index.js @@ -5,9 +5,10 @@ const nbodyAS = require("../assembly/index.js"); const nbodyRS = require("../rust/index.js"); // Load ASMJS version -var src = fs.readFileSync(__dirname + "/../build/index.asm.js", "utf8"); +var src = fs.readFileSync(__dirname + "/../build/index.asm.js", "utf8") + .replace(/const retasmFunc[^$]*$/g, ""); -const nbodyAsmJS = eval("0," + src)({ +const nbodyAsmJS = eval(src + ";asmFunc")({ Int8Array, Int16Array, Int32Array, diff --git a/examples/pson/build/optimized.wat b/examples/pson/build/optimized.wat index 7f3aa416..79c3b086 100644 --- a/examples/pson/build/optimized.wat +++ b/examples/pson/build/optimized.wat @@ -6,6 +6,9 @@ (type $Fv (func (param f64))) (type $i (func (result i32))) (type $I (func (result i64))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "pson" "onNull" (func $assembly/pson/onNull)) (import "pson" "onTrue" (func $assembly/pson/onTrue)) (import "pson" "onFalse" (func $assembly/pson/onFalse)) @@ -21,8 +24,8 @@ (import "pson" "onString" (func $assembly/pson/onString (param i32 i32))) (import "pson" "onBinary" (func $assembly/pson/onBinary (param i32 i32))) (global $assembly/pson/offset (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -38,7 +41,7 @@ (export "onString" (func $assembly/pson/onString)) (export "onBinary" (func $assembly/pson/onBinary)) (export "decode" (func $assembly/pson/decode)) - (func $assembly/pson/readVarint32 (; 14 ;) (type $i) (result i32) + (func $assembly/pson/readVarint32 (; 14 ;) (; has Stack IR ;) (type $i) (result i32) (local $0 i32) (local $1 i32) (local $2 i32) @@ -103,7 +106,7 @@ ;;@ assembly/pson.ts:140:9 (get_local $0) ) - (func $assembly/pson/readVarint64 (; 15 ;) (type $I) (result i64) + (func $assembly/pson/readVarint64 (; 15 ;) (; has Stack IR ;) (type $I) (result i64) (local $0 i64) (local $1 i32) (local $2 i64) @@ -169,7 +172,7 @@ ;;@ assembly/pson.ts:151:9 (get_local $0) ) - (func $assembly/pson/decodeValue (; 16 ;) (type $v) + (func $assembly/pson/decodeValue (; 16 ;) (; has Stack IR ;) (type $v) (local $0 i32) (local $1 i32) (local $2 i64) @@ -535,7 +538,7 @@ ) ) ) - (func $assembly/pson/decode (; 17 ;) (type $iv) (param $0 i32) + (func $assembly/pson/decode (; 17 ;) (; has Stack IR ;) (type $iv) (param $0 i32) ;;@ assembly/pson.ts:40:2 (set_global $assembly/pson/offset ;;@ assembly/pson.ts:40:11 @@ -568,4 +571,7 @@ (unreachable) ) ) + (func $null (; 18 ;) (; has Stack IR ;) (type $v) + (nop) + ) ) diff --git a/examples/pson/build/untouched.wat b/examples/pson/build/untouched.wat index 4cbfd94c..bfb39b8e 100644 --- a/examples/pson/build/untouched.wat +++ b/examples/pson/build/untouched.wat @@ -6,6 +6,9 @@ (type $Fv (func (param f64))) (type $i (func (result i32))) (type $I (func (result i64))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "pson" "onNull" (func $assembly/pson/onNull)) (import "pson" "onTrue" (func $assembly/pson/onTrue)) (import "pson" "onFalse" (func $assembly/pson/onFalse)) @@ -40,8 +43,8 @@ (global $assembly/pson/Token.STRING_GET i32 (i32.const 254)) (global $assembly/pson/Token.BINARY i32 (i32.const 255)) (global $HEAP_BASE i32 (i32.const 8)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "onNull" (func $assembly/pson/onNull)) (export "onTrue" (func $assembly/pson/onTrue)) (export "onFalse" (func $assembly/pson/onFalse)) @@ -469,6 +472,7 @@ (get_local $0) ) (block + ;;@ assembly/pson.ts:76:21 (block ;;@ assembly/pson.ts:77:8 (call $assembly/pson/decodeValue) @@ -785,4 +789,6 @@ (unreachable) ) ) + (func $null (; 18 ;) (type $v) + ) ) diff --git a/examples/ugc/README.md b/examples/ugc/README.md deleted file mode 100644 index 80012d00..00000000 --- a/examples/ugc/README.md +++ /dev/null @@ -1,20 +0,0 @@ -μgc garbage collector -===================== - -A port of [Bach Le's μgc garbage collector library](https://github.com/bullno1/ugc) to AssemblyScript. - -Instructions ------------- - -To build [assembly/ugc.ts](./assembly/ugc.ts) to an untouched and an optimized `.wasm` including their respective `.wat` representations, run: - -``` -$> npm run asbuild -``` - -Afterwards, to run the included [test](./tests/index.js): - -``` -$> npm install -$> npm test -``` diff --git a/examples/ugc/assembly/LICENSE b/examples/ugc/assembly/LICENSE deleted file mode 100644 index 16f15994..00000000 --- a/examples/ugc/assembly/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -ugc.ts is based on https://github.com/bullno1/ugc - -Copyright (c) 2017, Bach Le -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/examples/ugc/assembly/index.ts b/examples/ugc/assembly/index.ts deleted file mode 100644 index edb373d5..00000000 --- a/examples/ugc/assembly/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -import "allocator/tlsf"; -export { gc_collect, gc_pause, gc_resume } from "./ugc"; diff --git a/examples/ugc/assembly/tsconfig.json b/examples/ugc/assembly/tsconfig.json deleted file mode 100644 index 6e52b21c..00000000 --- a/examples/ugc/assembly/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "extends": "../../../std/assembly.json", - "include": [ - "./**/*.ts" - ] -} diff --git a/examples/ugc/assembly/ugc.ts b/examples/ugc/assembly/ugc.ts deleted file mode 100644 index 31b4947b..00000000 --- a/examples/ugc/assembly/ugc.ts +++ /dev/null @@ -1,297 +0,0 @@ -/////////////////////////// μgc Garbage Collector ///////////////////////////// -// based on https://github.com/bullno1/ugc - BSD (see LICENSE file) // -/////////////////////////////////////////////////////////////////////////////// - -// States -const IDLE: u8 = 0; -const MARK: u8 = 1; -const SWEEP: u8 = 2; - -// Gray tag -const GRAY: u32 = 2; - -/** Header for a managed object. */ -@unmanaged -class ObjectHeader { - - /////////////////////////////// Constants /////////////////////////////////// - - static readonly SIZE: usize = 2 * sizeof(); - - ///////////////////////////////// Fields //////////////////////////////////// - - // the next and prev pointer with tags in the least significant two bits that - // would otherwise be zero (blocks are guaranteed to be aligned to 8 bytes) - tagged_next: usize; - tagged_prev: usize; - - get next(): ObjectHeader { - return changetype(this.tagged_next & ~3); - } - - set next(value: ObjectHeader) { - this.tagged_next = changetype(value) | (this.tagged_next & 3); - } - - get prev(): ObjectHeader { - return changetype(this.tagged_prev & ~3); - } - - set prev(value: ObjectHeader) { - this.tagged_prev = changetype(value) | (this.tagged_prev & 3); - } - - get color(): u32 { - return this.tagged_next & 3; - } - - set color(value: u32) { - assert(value < 3); - this.tagged_next = this.tagged_next | value; - } - - ///////////////////////////////// Methods /////////////////////////////////// - - push(element: ObjectHeader): void { - element.next = this; - element.prev = this.prev; - this.prev.next = element; - this.prev = element; - } - - unlink(): void { - var next = this.next; - var prev = this.prev; - next.prev = prev; - prev.next = next; - } - - clear(): void { - this.next = this; - this.prev = this; - } -} - -/** Garbage collector data. */ -@unmanaged -class Control { - - /////////////////////////////// Constants /////////////////////////////////// - - static readonly SIZE: usize = 7 * sizeof() + 2 * sizeof(); - static readonly PAUSED_BIT: u8 = 1 << 7; - - ///////////////////////////////// Fields //////////////////////////////////// - - // 'from' and 'to' point here - private __set1_tagged_next: usize; - private __set1_tagged_prev: usize; - private __set2_tagged_next: usize; - private __set2_tagged_prev: usize; - - from: ObjectHeader; - to: ObjectHeader; - iterator: ObjectHeader; - state: u8; // MSB indicates paused - white: u8; - - /** Tests whether the collector is currently paused. */ - get paused(): bool { return (this.state & Control.PAUSED_BIT) != 0; } - /** Sets whether the collector is currently paused. */ - set paused(paused: bool) { - this.state = paused - ? this.state |= Control.PAUSED_BIT - : this.state &= ~Control.PAUSED_BIT; - } - - ///////////////////////////////// Methods /////////////////////////////////// - - /** Creates a new instance. */ - static create(mem: usize): Control { - var control = changetype(mem); - var set1 = changetype(mem); - var set2 = changetype(mem + 2 * sizeof()); - set1.clear(); - set2.clear(); - control.state = IDLE; - control.white = 0; - control.from = set1; - control.to = set2; - control.iterator = control.to; - return control; - } - - /** Registers a new object to be managed. */ - register(obj: ObjectHeader): void { - this.from.push(obj); - obj.color = this.white; - } - - /** - * Registers a new reference from one object to another. - * - * Whenever an object stores a reference to another object, this function - * MUST be called to ensure that the GC works correctly. - * - * Root objects (stack, globals) are treated differently so there is no need - * to call this function when a store to them occurs. - */ - addRef(parent: ObjectHeader, child: ObjectHeader): void { - var parent_color = parent.color; - var child_color = child.color; - var white = this.white; - var black = white ^ 1; - if (parent_color == black && child_color == white) { - this.makeGray(parent); - } - } - - /** - * Make the GC perform one unit of work. - * - * What happens depends on the current GC's state. - * - * - In IDLE state, it will scan the root by calling the scan callback then - * switch to MARK state. - * - In MARK state, it will mark one object and discover its children using - * the scan callback. When there is no object left to mark, the GC will - * scan the root once more to account for changes during the mark phase. - * When all live objects are marked, it will switch to SWEEP state. - * - In SWEEP state, it will release one object. When all garbage are - * released, it wil switch to UGC_IDLE state. - */ - step(): void { - var obj: ObjectHeader; - switch (this.state) { - - case IDLE: - gc_scan_fn(this, null); - this.state = MARK; - break; - - case MARK: - obj = this.iterator.next; - var white = this.white; - - if (obj != this.to) { - this.iterator = obj; - obj.color = white ^ 1; - gc_scan_fn(this, obj); - } else { - gc_scan_fn(this, null); - obj = this.iterator.next; // already strips tags, see * - if (obj == this.to) { - var from = this.from; - this.from = this.to; - this.to = from; - this.white = white ^ 1; - this.iterator = changetype(from.tagged_next); // * - this.state = SWEEP; - } - } - break; - - case SWEEP: - obj = this.iterator; - if (obj != this.to) { - this.iterator = obj.next; - gc_free_fn(this, obj); - } else { - this.to.clear(); - this.state = IDLE; - } - break; - } - } - - /** - * Performs a collection cycle. - * - * Start the GC if it's not already running and only return once the GC has - * finished collecting all garbage identified at the point of calling. - * - * If the GC is already in the SWEEP state, it will leave newly created - * garbage for the next cycle. - */ - collect(): void { - if (this.state == IDLE) { - this.step(); - } - while (this.state != IDLE) { - this.step(); - } - } - - /** Informs the GC of a referred object during the mark phase. */ - visit(obj: ObjectHeader): void { - if (this.state == SWEEP) { - return; - } - if (obj.color == this.white) { - this.makeGray(obj); - } - } - - makeGray(obj: ObjectHeader): void { - if (obj != this.iterator) { - obj.unlink(); - this.to.push(obj); - } else { - this.iterator = this.iterator.prev; - } - obj.color = GRAY; - } -} - -// TODO: should happen dynamically so it DCE's if all objects are unmanaged -var GC = Control.create(HEAP_BASE); -// var someObject = memory.allocate(64); -// GC.register(changetype(someObject)); - -// Exported interface - -/** Pauses automatic garbage collection. */ -export function gc_pause(): void { - GC.paused = true; -} - -/** Resumes automatic garbage collection. */ -export function gc_resume(): void { - GC.paused = false; -} - -/** Performs a collection cycle. Ignores pauses. */ -export function gc_collect(): void { - var paused = GC.paused; - GC.paused = false; - GC.collect(); - GC.paused = paused; -} - -// TODO: these functions must be generated by the compiler and combined by -// a potential linker. They live here for now to document their structure. - -function gc_scan_fn(control: Control, header: ObjectHeader | null): void { - if (!header) { - // visit all global vars referencing managed objects - } else { - // visit all referenced objects using the compiler's knowledge of this - // object's layout - var classId = load(changetype(header), ObjectHeader.SIZE); - // switch (classId) { - // arrays - // strings - // user-defined - // } - } -} - -function gc_free_fn(control: Control, header: ObjectHeader): void { - // finalize the given object using the compiler's knowledge of its layout - var classId = load(changetype(header) + ObjectHeader.SIZE); - // switch (classId) { - // array, string: free their data segments - // TODO: might make sense to provide @finalize or similar - // } - memory.free(changetype(header)); -} diff --git a/examples/ugc/build/optimized.wat b/examples/ugc/build/optimized.wat deleted file mode 100644 index 0610c675..00000000 --- a/examples/ugc/build/optimized.wat +++ /dev/null @@ -1,1055 +0,0 @@ -(module - (type $ii (func (param i32) (result i32))) - (type $iv (func (param i32))) - (type $iiv (func (param i32 i32))) - (type $v (func)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $assembly/ugc/GC (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 8)) - (memory $0 1) - (export "gc_collect" (func $assembly/ugc/gc_collect)) - (export "gc_pause" (func $assembly/ugc/gc_pause)) - (export "gc_resume" (func $assembly/ugc/gc_resume)) - (export "memory" (memory $0)) - (start $start) - (func $assembly/ugc/Control.create (; 0 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) - (i32.store - (get_local $0) - (i32.or - (get_local $0) - (i32.and - (i32.load - (get_local $0) - ) - (i32.const 3) - ) - ) - ) - (i32.store offset=4 - (get_local $0) - (i32.or - (get_local $0) - (i32.and - (i32.load offset=4 - (get_local $0) - ) - (i32.const 3) - ) - ) - ) - (i32.store - ;;@ assembly/ugc.ts:113:4 - (tee_local $1 - ;;@ assembly/ugc.ts:113:15 - (i32.add - (get_local $0) - (i32.const 8) - ) - ) - (i32.or - (get_local $1) - (i32.and - (i32.load - (get_local $1) - ) - (i32.const 3) - ) - ) - ) - (i32.store offset=4 - (get_local $1) - (i32.or - (get_local $1) - (i32.and - (i32.load offset=4 - (get_local $1) - ) - (i32.const 3) - ) - ) - ) - ;;@ assembly/ugc.ts:116:4 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:116:20 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:117:4 - (i32.store8 offset=29 - (get_local $0) - ;;@ assembly/ugc.ts:117:20 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:118:4 - (i32.store offset=16 - (get_local $0) - (get_local $0) - ) - ;;@ assembly/ugc.ts:119:4 - (i32.store offset=20 - (get_local $0) - (get_local $1) - ) - ;;@ assembly/ugc.ts:120:4 - (i32.store offset=24 - (get_local $0) - ;;@ assembly/ugc.ts:120:23 - (i32.load offset=20 - (get_local $0) - ) - ) - (get_local $0) - ) - (func $assembly/ugc/Control#set:paused (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - (set_local $2 - ;;@ assembly/ugc.ts:102:4 - (get_local $0) - ) - ;;@ assembly/ugc.ts:102:17 - (if - (i32.and - (get_local $1) - (i32.const 1) - ) - (i32.store8 offset=28 - (get_local $2) - (tee_local $0 - (i32.or - ;;@ assembly/ugc.ts:103:8 - (i32.load8_u offset=28 - (get_local $2) - ) - ;;@ assembly/ugc.ts:103:22 - (i32.const 128) - ) - ) - ) - (i32.store8 offset=28 - (get_local $2) - (tee_local $0 - (i32.and - ;;@ assembly/ugc.ts:104:8 - (i32.load8_u offset=28 - (get_local $2) - ) - (i32.const -129) - ) - ) - ) - ) - ;;@ assembly/ugc.ts:102:4 - (i32.store8 offset=28 - (get_local $2) - (get_local $0) - ) - ) - (func $~lib/allocator/tlsf/Root#remove (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:264:4 - (if (result i32) - ;;@ ~lib/allocator/tlsf.ts:264:8 - (i32.lt_u - ;;@ ~lib/allocator/tlsf.ts:259:4 - (tee_local $2 - ;;@ ~lib/allocator/tlsf.ts:259:15 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:257:20 - (i32.load - (get_local $1) - ) - (i32.const -4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:264:15 - (i32.const 256) - ) - (block (result i32) - ;;@ ~lib/allocator/tlsf.ts:266:6 - (set_local $4 - ;;@ ~lib/allocator/tlsf.ts:266:11 - (i32.div_u - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:266:24 - (i32.const 8) - ) - ) - (i32.const 0) - ) - (block (result i32) - ;;@ ~lib/allocator/tlsf.ts:269:6 - (set_local $4 - ;;@ ~lib/allocator/tlsf.ts:269:11 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:269:17 - (i32.shr_u - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:269:26 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:268:6 - (tee_local $3 - (i32.sub - (i32.const 31) - (i32.clz - (get_local $2) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:269:32 - (i32.const 5) - ) - ) - (i32.const 32) - ) - ) - (i32.sub - (get_local $3) - (i32.const 7) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:275:4 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:275:15 - (i32.load offset=8 - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:276:4 - (if - ;;@ ~lib/allocator/tlsf.ts:274:4 - (tee_local $5 - ;;@ ~lib/allocator/tlsf.ts:274:15 - (i32.load offset=4 - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:276:14 - (i32.store offset=8 - (get_local $5) - (get_local $2) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:277:4 - (if - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:277:14 - (i32.store offset=4 - (get_local $2) - (get_local $5) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:280:4 - (if - ;;@ ~lib/allocator/tlsf.ts:280:8 - (i32.eq - (get_local $1) - (i32.load offset=96 - (i32.add - (get_local $0) - (i32.shl - (i32.add - (i32.shl - (get_local $3) - (i32.const 5) - ) - (get_local $4) - ) - (i32.const 2) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:280:39 - (block - (i32.store offset=96 - (i32.add - (get_local $0) - (i32.shl - (i32.add - (i32.shl - (get_local $3) - (i32.const 5) - ) - (get_local $4) - ) - (i32.const 2) - ) - ) - (get_local $2) - ) - ;;@ ~lib/allocator/tlsf.ts:284:6 - (if - ;;@ ~lib/allocator/tlsf.ts:284:10 - (i32.eqz - (get_local $2) - ) - ;;@ ~lib/allocator/tlsf.ts:284:17 - (block - (i32.store offset=4 - (i32.add - (get_local $0) - (i32.shl - (get_local $3) - (i32.const 2) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:286:26 - (tee_local $1 - (i32.and - (i32.load offset=4 - (i32.add - (get_local $0) - (i32.shl - (get_local $3) - (i32.const 2) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:286:35 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:286:36 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:286:37 - (i32.const 1) - (get_local $4) - ) - (i32.const -1) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:289:8 - (if - ;;@ ~lib/allocator/tlsf.ts:289:12 - (i32.eqz - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:289:20 - (i32.store - (get_local $0) - (i32.and - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:289:34 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:289:35 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:289:36 - (i32.const 1) - (get_local $3) - ) - (i32.const -1) - ) - ) - ) - ) - ) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/Root#insert (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - ;;@ ~lib/allocator/tlsf.ts:190:4 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:190:20 - (i32.load - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:201:4 - (if - ;;@ ~lib/allocator/tlsf.ts:201:8 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:198:4 - (tee_local $5 - ;;@ ~lib/allocator/tlsf.ts:198:20 - (i32.load - ;;@ ~lib/allocator/tlsf.ts:197:4 - (tee_local $4 - (i32.add - (i32.add - (get_local $1) - (i32.const 8) - ) - (i32.and - (i32.load - (get_local $1) - ) - (i32.const -4) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:201:20 - (i32.const 1) - ) - ;;@ ~lib/allocator/tlsf.ts:201:26 - (block - ;;@ ~lib/allocator/tlsf.ts:202:11 - (call $~lib/allocator/tlsf/Root#remove - (get_local $0) - (get_local $4) - ) - ;;@ ~lib/allocator/tlsf.ts:203:6 - (i32.store - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:203:19 - (tee_local $2 - (i32.add - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:203:33 - (i32.add - ;;@ ~lib/allocator/tlsf.ts:203:46 - (i32.and - (get_local $5) - (i32.const -4) - ) - ;;@ ~lib/allocator/tlsf.ts:203:33 - (i32.const 8) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:205:6 - (set_local $5 - ;;@ ~lib/allocator/tlsf.ts:205:18 - (i32.load - ;;@ ~lib/allocator/tlsf.ts:204:6 - (tee_local $4 - (i32.add - (i32.add - (get_local $1) - (i32.const 8) - ) - (i32.and - (i32.load - (get_local $1) - ) - (i32.const -4) - ) - ) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:210:4 - (if - ;;@ ~lib/allocator/tlsf.ts:210:8 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:210:20 - (i32.const 2) - ) - ;;@ ~lib/allocator/tlsf.ts:210:31 - (block - ;;@ ~lib/allocator/tlsf.ts:212:6 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:212:21 - (i32.load - ;;@ ~lib/allocator/tlsf.ts:211:6 - (tee_local $1 - (i32.load - (i32.sub - (get_local $1) - (i32.const 4) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:214:11 - (call $~lib/allocator/tlsf/Root#remove - (get_local $0) - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:215:6 - (i32.store - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:215:18 - (tee_local $3 - (i32.add - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:215:31 - (i32.add - ;;@ ~lib/allocator/tlsf.ts:215:44 - (i32.and - (get_local $2) - (i32.const -4) - ) - ;;@ ~lib/allocator/tlsf.ts:215:31 - (i32.const 8) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:217:6 - (set_local $2 - (get_local $3) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:221:4 - (i32.store - (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:221:17 - (i32.or - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:221:29 - (i32.const 2) - ) - ) - (i32.store - (i32.sub - (get_local $4) - (i32.const 4) - ) - (get_local $1) - ) - (set_local $4 - (i32.load offset=96 - (i32.add - (get_local $0) - (i32.shl - (i32.add - (i32.shl - (tee_local $2 - ;;@ ~lib/allocator/tlsf.ts:230:4 - (if (result i32) - ;;@ ~lib/allocator/tlsf.ts:230:8 - (i32.lt_u - ;;@ ~lib/allocator/tlsf.ts:225:4 - (tee_local $3 - ;;@ ~lib/allocator/tlsf.ts:225:11 - (i32.and - (get_local $2) - (i32.const -4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:230:15 - (i32.const 256) - ) - (block (result i32) - ;;@ ~lib/allocator/tlsf.ts:232:6 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:232:11 - (i32.div_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:232:24 - (i32.const 8) - ) - ) - (i32.const 0) - ) - (block (result i32) - ;;@ ~lib/allocator/tlsf.ts:235:6 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:235:11 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:235:17 - (i32.shr_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:235:26 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:234:6 - (tee_local $2 - (i32.sub - (i32.const 31) - (i32.clz - (get_local $3) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:235:32 - (i32.const 5) - ) - ) - (i32.const 32) - ) - ) - (i32.sub - (get_local $2) - (i32.const 7) - ) - ) - ) - ) - (i32.const 5) - ) - (get_local $3) - ) - (i32.const 2) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:241:4 - (i32.store offset=4 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:241:17 - (i32.const 0) - ) - ;;@ ~lib/allocator/tlsf.ts:242:4 - (i32.store offset=8 - (get_local $1) - (get_local $4) - ) - ;;@ ~lib/allocator/tlsf.ts:243:4 - (if - (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:243:14 - (i32.store offset=4 - (get_local $4) - (get_local $1) - ) - ) - (i32.store offset=96 - (i32.add - (get_local $0) - (i32.shl - (i32.add - (i32.shl - (get_local $2) - (i32.const 5) - ) - (get_local $3) - ) - (i32.const 2) - ) - ) - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:247:4 - (i32.store - (get_local $0) - (i32.or - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:247:18 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:247:19 - (i32.const 1) - (get_local $2) - ) - ) - ) - (i32.store offset=4 - (i32.add - (get_local $0) - (i32.shl - (get_local $2) - (i32.const 2) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:248:22 - (i32.or - (i32.load offset=4 - (i32.add - (get_local $0) - (i32.shl - (get_local $2) - (i32.const 2) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:248:42 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:248:43 - (i32.const 1) - (get_local $3) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/free_memory (; 4 ;) (type $iv) (param $0 i32) - (local $1 i32) - (local $2 i32) - ;;@ ~lib/allocator/tlsf.ts:492:2 - (if - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:494:4 - (if - ;;@ ~lib/allocator/tlsf.ts:493:4 - (tee_local $1 - ;;@ ~lib/allocator/tlsf.ts:493:15 - (get_global $~lib/allocator/tlsf/ROOT) - ) - ;;@ ~lib/allocator/tlsf.ts:494:14 - (block - ;;@ ~lib/allocator/tlsf.ts:496:6 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:496:22 - (i32.load - ;;@ ~lib/allocator/tlsf.ts:495:6 - (tee_local $0 - ;;@ ~lib/allocator/tlsf.ts:495:18 - (i32.sub - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:495:43 - (i32.const 8) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:498:6 - (i32.store - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:498:19 - (i32.or - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:498:31 - (i32.const 1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:499:11 - (call $~lib/allocator/tlsf/Root#insert - (get_local $1) - (get_local $0) - ) - ) - ) - ) - ) - (func $assembly/ugc/Control#step (; 5 ;) (type $iv) (param $0 i32) - (local $1 i32) - (local $2 i32) - ;;@ assembly/ugc.ts:165:4 - (block $break|0 - (block $case2|0 - (block $case1|0 - (if - (tee_local $1 - ;;@ assembly/ugc.ts:165:12 - (i32.load8_u offset=28 - (get_local $0) - ) - ) - (block - (br_if $case1|0 - (i32.eq - (get_local $1) - ;;@ assembly/ugc.ts:172:11 - (i32.const 1) - ) - ) - (br_if $case2|0 - (i32.eq - (get_local $1) - ;;@ assembly/ugc.ts:194:11 - (i32.const 2) - ) - ) - (br $break|0) - ) - ) - ;;@ assembly/ugc.ts:169:8 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:169:21 - (i32.const 1) - ) - ;;@ assembly/ugc.ts:170:8 - (br $break|0) - ) - ;;@ assembly/ugc.ts:174:8 - (set_local $2 - ;;@ assembly/ugc.ts:174:20 - (i32.load8_u offset=29 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:176:8 - (if - ;;@ assembly/ugc.ts:176:12 - (i32.ne - ;;@ assembly/ugc.ts:173:8 - (tee_local $1 - (i32.and - (i32.load - ;;@ assembly/ugc.ts:173:14 - (i32.load offset=24 - (get_local $0) - ) - ) - (i32.const -4) - ) - ) - ;;@ assembly/ugc.ts:176:19 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:176:28 - (block - ;;@ assembly/ugc.ts:177:10 - (i32.store offset=24 - (get_local $0) - (get_local $1) - ) - (i32.store - (get_local $1) - (i32.or - (i32.load - (get_local $1) - ) - (i32.xor - (get_local $2) - ;;@ assembly/ugc.ts:178:30 - (i32.const 1) - ) - ) - ) - (if - (get_local $1) - (drop - (i32.load offset=8 - (get_local $1) - ) - ) - ) - ) - ;;@ assembly/ugc.ts:183:10 - (if - ;;@ assembly/ugc.ts:183:14 - (i32.eq - (i32.and - (i32.load - ;;@ assembly/ugc.ts:182:16 - (i32.load offset=24 - (get_local $0) - ) - ) - (i32.const -4) - ) - ;;@ assembly/ugc.ts:183:21 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:183:30 - (block - ;;@ assembly/ugc.ts:184:12 - (set_local $1 - ;;@ assembly/ugc.ts:184:23 - (i32.load offset=16 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:185:12 - (i32.store offset=16 - (get_local $0) - ;;@ assembly/ugc.ts:185:24 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:186:12 - (i32.store offset=20 - (get_local $0) - (get_local $1) - ) - ;;@ assembly/ugc.ts:187:12 - (i32.store8 offset=29 - (get_local $0) - ;;@ assembly/ugc.ts:187:25 - (i32.xor - (get_local $2) - ;;@ assembly/ugc.ts:187:33 - (i32.const 1) - ) - ) - ;;@ assembly/ugc.ts:188:12 - (i32.store offset=24 - (get_local $0) - ;;@ assembly/ugc.ts:188:28 - (i32.load - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:189:12 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:189:25 - (i32.const 2) - ) - ) - ) - ) - ;;@ assembly/ugc.ts:192:8 - (br $break|0) - ) - ;;@ assembly/ugc.ts:196:8 - (if - ;;@ assembly/ugc.ts:196:12 - (i32.ne - ;;@ assembly/ugc.ts:195:8 - (tee_local $1 - ;;@ assembly/ugc.ts:195:14 - (i32.load offset=24 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:196:19 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:196:28 - (block - ;;@ assembly/ugc.ts:197:10 - (i32.store offset=24 - (get_local $0) - (i32.and - (i32.load - (get_local $1) - ) - (i32.const -4) - ) - ) - (drop - (i32.load - (i32.add - (get_local $1) - (i32.const 8) - ) - ) - ) - (call $~lib/allocator/tlsf/free_memory - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:199:15 - (block - (i32.store - (tee_local $1 - ;;@ assembly/ugc.ts:200:10 - (i32.load offset=20 - (get_local $0) - ) - ) - (i32.or - (get_local $1) - (i32.and - (i32.load - (get_local $1) - ) - (i32.const 3) - ) - ) - ) - (i32.store offset=4 - (get_local $1) - (i32.or - (get_local $1) - (i32.and - (i32.load offset=4 - (get_local $1) - ) - (i32.const 3) - ) - ) - ) - ;;@ assembly/ugc.ts:201:10 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:201:23 - (i32.const 0) - ) - ) - ) - ) - ) - (func $assembly/ugc/gc_collect (; 6 ;) (type $v) - (local $0 i32) - (local $1 i32) - ;;@ assembly/ugc.ts:265:2 - (set_local $1 - (i32.ne - (i32.and - (i32.load8_u offset=28 - ;;@ assembly/ugc.ts:265:15 - (get_global $assembly/ugc/GC) - ) - (i32.const 128) - ) - (i32.const 0) - ) - ) - ;;@ assembly/ugc.ts:266:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:266:14 - (i32.const 0) - ) - (if - (i32.eqz - (i32.load8_u offset=28 - (tee_local $0 - ;;@ assembly/ugc.ts:267:2 - (get_global $assembly/ugc/GC) - ) - ) - ) - (call $assembly/ugc/Control#step - (get_local $0) - ) - ) - (loop $continue|0 - (if - (i32.load8_u offset=28 - (get_local $0) - ) - (block - (call $assembly/ugc/Control#step - (get_local $0) - ) - (br $continue|0) - ) - ) - ) - ;;@ assembly/ugc.ts:268:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - (get_local $1) - ) - ) - (func $assembly/ugc/gc_pause (; 7 ;) (type $v) - ;;@ assembly/ugc.ts:255:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:255:14 - (i32.const 1) - ) - ) - (func $assembly/ugc/gc_resume (; 8 ;) (type $v) - ;;@ assembly/ugc.ts:260:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:260:14 - (i32.const 0) - ) - ) - (func $start (; 9 ;) (type $v) - (set_global $assembly/ugc/GC - ;;@ assembly/ugc.ts:247:17 - (call $assembly/ugc/Control.create - ;;@ assembly/ugc.ts:247:24 - (get_global $HEAP_BASE) - ) - ) - ) -) diff --git a/examples/ugc/build/untouched.wat b/examples/ugc/build/untouched.wat deleted file mode 100644 index 59507388..00000000 --- a/examples/ugc/build/untouched.wat +++ /dev/null @@ -1,2023 +0,0 @@ -(module - (type $iiiiv (func (param i32 i32 i32 i32))) - (type $ii (func (param i32) (result i32))) - (type $iv (func (param i32))) - (type $iiv (func (param i32 i32))) - (type $v (func)) - (type $iiii (func (param i32 i32 i32) (result i32))) - (type $iii (func (param i32 i32) (result i32))) - (type $iiiv (func (param i32 i32 i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) - (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) - (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) - (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) - (global $~lib/allocator/tlsf/SL_BITS i32 (i32.const 5)) - (global $~lib/allocator/tlsf/SL_SIZE i32 (i32.const 32)) - (global $~lib/allocator/tlsf/SB_BITS i32 (i32.const 8)) - (global $~lib/allocator/tlsf/SB_SIZE i32 (i32.const 256)) - (global $~lib/allocator/tlsf/FL_BITS i32 (i32.const 22)) - (global $~lib/allocator/tlsf/FREE i32 (i32.const 1)) - (global $~lib/allocator/tlsf/LEFT_FREE i32 (i32.const 2)) - (global $~lib/allocator/tlsf/TAGS i32 (i32.const 3)) - (global $~lib/allocator/tlsf/ROOT (mut i32) (i32.const 0)) - (global $assembly/ugc/IDLE i32 (i32.const 0)) - (global $assembly/ugc/MARK i32 (i32.const 1)) - (global $assembly/ugc/SWEEP i32 (i32.const 2)) - (global $assembly/ugc/GRAY i32 (i32.const 2)) - (global $assembly/ugc/GC (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 92)) - (memory $0 1) - (data (i32.const 8) "\16\00\00\00~\00l\00i\00b\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00/\00t\00l\00s\00f\00.\00t\00s\00") - (data (i32.const 56) "\0f\00\00\00a\00s\00s\00e\00m\00b\00l\00y\00/\00u\00g\00c\00.\00t\00s\00") - (export "gc_collect" (func $assembly/ugc/gc_collect)) - (export "gc_pause" (func $assembly/ugc/gc_pause)) - (export "gc_resume" (func $assembly/ugc/gc_resume)) - (export "memory" (memory $0)) - (start $start) - (func $assembly/ugc/ObjectHeader#set:next (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) - ;;@ assembly/ugc.ts:33:4 - (i32.store - (get_local $0) - ;;@ assembly/ugc.ts:33:23 - (i32.or - (get_local $1) - ;;@ assembly/ugc.ts:33:50 - (i32.and - ;;@ assembly/ugc.ts:33:51 - (i32.load - (get_local $0) - ) - ;;@ assembly/ugc.ts:33:70 - (i32.const 3) - ) - ) - ) - ) - (func $assembly/ugc/ObjectHeader#set:prev (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32) - ;;@ assembly/ugc.ts:41:4 - (i32.store offset=4 - (get_local $0) - ;;@ assembly/ugc.ts:41:23 - (i32.or - (get_local $1) - ;;@ assembly/ugc.ts:41:50 - (i32.and - ;;@ assembly/ugc.ts:41:51 - (i32.load offset=4 - (get_local $0) - ) - ;;@ assembly/ugc.ts:41:70 - (i32.const 3) - ) - ) - ) - ) - (func $assembly/ugc/ObjectHeader#clear (; 3 ;) (type $iv) (param $0 i32) - ;;@ assembly/ugc.ts:70:4 - (call $assembly/ugc/ObjectHeader#set:next - (get_local $0) - ;;@ assembly/ugc.ts:70:16 - (get_local $0) - ) - ;;@ assembly/ugc.ts:71:4 - (call $assembly/ugc/ObjectHeader#set:prev - (get_local $0) - ;;@ assembly/ugc.ts:71:16 - (get_local $0) - ) - ) - (func $assembly/ugc/Control.create (; 4 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - ;;@ assembly/ugc.ts:111:4 - (set_local $1 - ;;@ assembly/ugc.ts:111:18 - (get_local $0) - ) - ;;@ assembly/ugc.ts:112:4 - (set_local $2 - ;;@ assembly/ugc.ts:112:15 - (get_local $0) - ) - ;;@ assembly/ugc.ts:113:4 - (set_local $3 - ;;@ assembly/ugc.ts:113:15 - (i32.add - ;;@ assembly/ugc.ts:113:40 - (get_local $0) - ;;@ assembly/ugc.ts:113:46 - (i32.mul - (i32.const 2) - ;;@ assembly/ugc.ts:113:50 - (i32.const 4) - ) - ) - ) - ;;@ assembly/ugc.ts:114:9 - (call $assembly/ugc/ObjectHeader#clear - ;;@ assembly/ugc.ts:114:4 - (get_local $2) - ) - ;;@ assembly/ugc.ts:115:9 - (call $assembly/ugc/ObjectHeader#clear - ;;@ assembly/ugc.ts:115:4 - (get_local $3) - ) - ;;@ assembly/ugc.ts:116:4 - (i32.store8 offset=28 - (get_local $1) - ;;@ assembly/ugc.ts:116:20 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:117:4 - (i32.store8 offset=29 - (get_local $1) - ;;@ assembly/ugc.ts:117:20 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:118:4 - (i32.store offset=16 - (get_local $1) - ;;@ assembly/ugc.ts:118:19 - (get_local $2) - ) - ;;@ assembly/ugc.ts:119:4 - (i32.store offset=20 - (get_local $1) - ;;@ assembly/ugc.ts:119:17 - (get_local $3) - ) - ;;@ assembly/ugc.ts:120:4 - (i32.store offset=24 - (get_local $1) - ;;@ assembly/ugc.ts:120:23 - (i32.load offset=20 - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:121:11 - (get_local $1) - ) - (func $assembly/ugc/Control#get:paused (; 5 ;) (type $ii) (param $0 i32) (result i32) - ;;@ assembly/ugc.ts:99:67 - (i32.ne - ;;@ assembly/ugc.ts:99:30 - (i32.and - ;;@ assembly/ugc.ts:99:31 - (i32.load8_u offset=28 - (get_local $0) - ) - ;;@ assembly/ugc.ts:99:44 - (i32.const 128) - ) - ;;@ assembly/ugc.ts:99:67 - (i32.const 0) - ) - ) - (func $assembly/ugc/Control#set:paused (; 6 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - ;;@ assembly/ugc.ts:102:4 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:102:17 - (if (result i32) - (i32.and - (get_local $1) - (i32.const 1) - ) - ;;@ assembly/ugc.ts:103:8 - (block (result i32) - (set_local $2 - (i32.or - (i32.load8_u offset=28 - (get_local $0) - ) - ;;@ assembly/ugc.ts:103:22 - (i32.const 128) - ) - ) - (i32.store8 offset=28 - ;;@ assembly/ugc.ts:103:8 - (get_local $0) - (get_local $2) - ) - (get_local $2) - ) - ;;@ assembly/ugc.ts:104:8 - (block (result i32) - (set_local $2 - (i32.and - (i32.load8_u offset=28 - (get_local $0) - ) - ;;@ assembly/ugc.ts:104:22 - (i32.xor - ;;@ assembly/ugc.ts:104:23 - (i32.const 128) - (i32.const -1) - ) - ) - ) - (i32.store8 offset=28 - ;;@ assembly/ugc.ts:104:8 - (get_local $0) - (get_local $2) - ) - (get_local $2) - ) - ) - ) - ) - (func $assembly/ugc/gc_scan_fn (; 7 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - ;;@ assembly/ugc.ts:275:2 - (if - ;;@ assembly/ugc.ts:275:6 - (i32.eqz - ;;@ assembly/ugc.ts:275:7 - (get_local $1) - ) - ;;@ assembly/ugc.ts:275:15 - (nop) - ;;@ assembly/ugc.ts:277:9 - (set_local $2 - ;;@ assembly/ugc.ts:280:18 - (i32.load offset=8 - ;;@ assembly/ugc.ts:280:28 - (get_local $1) - ) - ) - ) - ) - (func $assembly/ugc/ObjectHeader#get:next (; 8 ;) (type $ii) (param $0 i32) (result i32) - ;;@ assembly/ugc.ts:29:57 - (i32.and - ;;@ assembly/ugc.ts:29:36 - (i32.load - (get_local $0) - ) - ;;@ assembly/ugc.ts:29:55 - (i32.xor - ;;@ assembly/ugc.ts:29:56 - (i32.const 3) - (i32.const -1) - ) - ) - ) - (func $assembly/ugc/ObjectHeader#set:color (; 9 ;) (type $iiv) (param $0 i32) (param $1 i32) - ;;@ assembly/ugc.ts:49:4 - (if - (i32.eqz - ;;@ assembly/ugc.ts:49:11 - (i32.lt_u - (get_local $1) - ;;@ assembly/ugc.ts:49:19 - (i32.const 3) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 56) - (i32.const 49) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ assembly/ugc.ts:50:4 - (i32.store - (get_local $0) - ;;@ assembly/ugc.ts:50:23 - (i32.or - (i32.load - (get_local $0) - ) - ;;@ assembly/ugc.ts:50:42 - (get_local $1) - ) - ) - ) - (func $~lib/allocator/tlsf/Block#get:right (; 10 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) - ;;@ ~lib/allocator/tlsf.ts:89:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:89:11 - (i32.and - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:89:23 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:89:24 - (i32.const 3) - (i32.const -1) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 89) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:94:4 - (if (result i32) - (i32.eqz - (tee_local $1 - ;;@ ~lib/allocator/tlsf.ts:91:6 - (i32.add - ;;@ ~lib/allocator/tlsf.ts:92:8 - (i32.add - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:92:34 - (i32.const 8) - ) - ;;@ ~lib/allocator/tlsf.ts:92:47 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:92:48 - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:92:60 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:92:61 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 90) - (i32.const 11) - ) - (unreachable) - ) - (get_local $1) - ) - ) - (func $~lib/allocator/tlsf/fls (; 11 ;) (type $ii) (param $0 i32) (result i32) - ;;@ ~lib/allocator/tlsf.ts:428:2 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:428:9 - (i32.ne - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:428:17 - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 428) - (i32.const 2) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:430:26 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:430:9 - (i32.const 31) - ;;@ ~lib/allocator/tlsf.ts:430:15 - (i32.clz - ;;@ ~lib/allocator/tlsf.ts:430:22 - (get_local $0) - ) - ) - ) - (func $~lib/allocator/tlsf/Root#getHead (; 12 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - ;;@ ~lib/allocator/tlsf.ts:158:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:158:11 - (i32.lt_u - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:158:16 - (i32.const 22) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 158) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:159:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:159:11 - (i32.lt_u - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:159:16 - (i32.const 32) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 159) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:162:20 - (i32.load offset=96 - ;;@ ~lib/allocator/tlsf.ts:161:6 - (i32.add - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:161:32 - (i32.mul - (i32.add - ;;@ ~lib/allocator/tlsf.ts:161:33 - (i32.mul - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:161:38 - (i32.const 32) - ) - ;;@ ~lib/allocator/tlsf.ts:161:48 - (get_local $2) - ) - ;;@ ~lib/allocator/tlsf.ts:161:61 - (i32.const 4) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/Root#setHead (; 13 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) - ;;@ ~lib/allocator/tlsf.ts:167:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:167:11 - (i32.lt_u - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:167:16 - (i32.const 22) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 167) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:168:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:168:11 - (i32.lt_u - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:168:16 - (i32.const 32) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 168) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:169:4 - (i32.store offset=96 - ;;@ ~lib/allocator/tlsf.ts:170:6 - (i32.add - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:170:32 - (i32.mul - (i32.add - ;;@ ~lib/allocator/tlsf.ts:170:33 - (i32.mul - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:170:38 - (i32.const 32) - ) - ;;@ ~lib/allocator/tlsf.ts:170:48 - (get_local $2) - ) - ;;@ ~lib/allocator/tlsf.ts:170:61 - (i32.const 4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:171:6 - (get_local $3) - ) - ) - (func $~lib/allocator/tlsf/Root#getSLMap (; 14 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - ;;@ ~lib/allocator/tlsf.ts:138:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:138:11 - (i32.lt_u - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:138:16 - (i32.const 22) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 138) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:139:68 - (i32.load offset=4 - ;;@ ~lib/allocator/tlsf.ts:139:21 - (i32.add - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:139:47 - (i32.mul - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:139:52 - (i32.const 4) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/Root#setSLMap (; 15 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) - ;;@ ~lib/allocator/tlsf.ts:144:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:144:11 - (i32.lt_u - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:144:16 - (i32.const 22) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 144) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:145:4 - (i32.store offset=4 - ;;@ ~lib/allocator/tlsf.ts:145:15 - (i32.add - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:145:41 - (i32.mul - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:145:46 - (i32.const 4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:145:49 - (get_local $2) - ) - ) - (func $~lib/allocator/tlsf/Root#remove (; 16 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - ;;@ ~lib/allocator/tlsf.ts:257:4 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:257:20 - (i32.load - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:258:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:258:11 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:258:23 - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 258) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:259:4 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:259:15 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:259:27 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:259:28 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:260:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:260:11 - (if (result i32) - (tee_local $4 - (i32.ge_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:260:19 - (i32.const 16) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:260:37 - (i32.lt_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:260:44 - (i32.const 1073741824) - ) - (get_local $4) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 260) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:264:4 - (if - ;;@ ~lib/allocator/tlsf.ts:264:8 - (i32.lt_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:264:15 - (i32.const 256) - ) - ;;@ ~lib/allocator/tlsf.ts:264:24 - (block - ;;@ ~lib/allocator/tlsf.ts:265:6 - (set_local $5 - ;;@ ~lib/allocator/tlsf.ts:265:11 - (i32.const 0) - ) - ;;@ ~lib/allocator/tlsf.ts:266:6 - (set_local $6 - ;;@ ~lib/allocator/tlsf.ts:266:11 - (i32.div_u - ;;@ ~lib/allocator/tlsf.ts:266:17 - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:266:24 - (i32.const 8) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:267:11 - (block - ;;@ ~lib/allocator/tlsf.ts:268:6 - (set_local $5 - ;;@ ~lib/allocator/tlsf.ts:268:11 - (call $~lib/allocator/tlsf/fls - ;;@ ~lib/allocator/tlsf.ts:268:22 - (get_local $3) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:269:6 - (set_local $6 - ;;@ ~lib/allocator/tlsf.ts:269:11 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:269:17 - (i32.shr_u - ;;@ ~lib/allocator/tlsf.ts:269:18 - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:269:26 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:269:27 - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:269:32 - (i32.const 5) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:269:44 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:269:45 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:269:50 - (i32.const 5) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:270:6 - (set_local $5 - (i32.sub - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:270:12 - (i32.sub - (i32.const 8) - ;;@ ~lib/allocator/tlsf.ts:270:22 - (i32.const 1) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:274:4 - (set_local $7 - ;;@ ~lib/allocator/tlsf.ts:274:15 - (i32.load offset=4 - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:275:4 - (set_local $8 - ;;@ ~lib/allocator/tlsf.ts:275:15 - (i32.load offset=8 - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:276:4 - (if - ;;@ ~lib/allocator/tlsf.ts:276:8 - (get_local $7) - ;;@ ~lib/allocator/tlsf.ts:276:14 - (i32.store offset=8 - (get_local $7) - ;;@ ~lib/allocator/tlsf.ts:276:26 - (get_local $8) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:277:4 - (if - ;;@ ~lib/allocator/tlsf.ts:277:8 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:277:14 - (i32.store offset=4 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:277:26 - (get_local $7) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:280:4 - (if - ;;@ ~lib/allocator/tlsf.ts:280:8 - (i32.eq - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:280:22 - (call $~lib/allocator/tlsf/Root#getHead - ;;@ ~lib/allocator/tlsf.ts:280:17 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:280:30 - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:280:34 - (get_local $6) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:280:39 - (block - ;;@ ~lib/allocator/tlsf.ts:281:11 - (call $~lib/allocator/tlsf/Root#setHead - ;;@ ~lib/allocator/tlsf.ts:281:6 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:281:19 - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:281:23 - (get_local $6) - ;;@ ~lib/allocator/tlsf.ts:281:27 - (get_local $8) - ) - ;;@ ~lib/allocator/tlsf.ts:284:6 - (if - ;;@ ~lib/allocator/tlsf.ts:284:10 - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:284:11 - (get_local $8) - ) - ;;@ ~lib/allocator/tlsf.ts:284:17 - (block - ;;@ ~lib/allocator/tlsf.ts:285:8 - (set_local $4 - ;;@ ~lib/allocator/tlsf.ts:285:25 - (call $~lib/allocator/tlsf/Root#getSLMap - ;;@ ~lib/allocator/tlsf.ts:285:20 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:285:34 - (get_local $5) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:286:13 - (call $~lib/allocator/tlsf/Root#setSLMap - ;;@ ~lib/allocator/tlsf.ts:286:8 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:286:22 - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:286:26 - (tee_local $4 - (i32.and - (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:286:35 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:286:36 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:286:37 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:286:42 - (get_local $6) - ) - (i32.const -1) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:289:8 - (if - ;;@ ~lib/allocator/tlsf.ts:289:12 - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:289:13 - (get_local $4) - ) - ;;@ ~lib/allocator/tlsf.ts:289:20 - (i32.store - (get_local $0) - (i32.and - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:289:34 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:289:35 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:289:36 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:289:41 - (get_local $5) - ) - (i32.const -1) - ) - ) - ) - ) - ) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/Block#get:left (; 17 ;) (type $ii) (param $0 i32) (result i32) - (local $1 i32) - ;;@ ~lib/allocator/tlsf.ts:81:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:81:11 - (i32.and - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:81:23 - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 81) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:84:4 - (if (result i32) - (i32.eqz - (tee_local $1 - ;;@ ~lib/allocator/tlsf.ts:83:6 - (i32.load - ;;@ ~lib/allocator/tlsf.ts:83:18 - (i32.sub - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:83:44 - (i32.const 4) - ) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 82) - (i32.const 11) - ) - (unreachable) - ) - (get_local $1) - ) - ) - (func $~lib/allocator/tlsf/Root#setJump (; 18 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) - ;;@ ~lib/allocator/tlsf.ts:334:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:334:11 - (i32.and - (i32.load - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:334:23 - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 334) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:335:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:335:11 - (i32.eq - (call $~lib/allocator/tlsf/Block#get:right - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:335:25 - (get_local $2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 335) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:336:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:336:11 - (i32.and - (i32.load - (get_local $2) - ) - ;;@ ~lib/allocator/tlsf.ts:336:24 - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 336) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:337:4 - (i32.store - ;;@ ~lib/allocator/tlsf.ts:338:6 - (i32.sub - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:338:33 - (i32.const 4) - ) - ;;@ ~lib/allocator/tlsf.ts:339:6 - (get_local $1) - ) - ) - (func $~lib/allocator/tlsf/Root#insert (; 19 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - (local $9 i32) - (local $10 i32) - ;;@ ~lib/allocator/tlsf.ts:189:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:189:11 - (get_local $1) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 189) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:190:4 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:190:20 - (i32.load - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:191:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:191:11 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:191:23 - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 191) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:193:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:194:6 - (if (result i32) - (tee_local $4 - (i32.ge_u - (tee_local $3 - ;;@ ~lib/allocator/tlsf.ts:194:14 - (i32.and - (i32.load - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:194:27 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:194:28 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:194:37 - (i32.const 16) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:194:55 - (i32.lt_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:194:62 - (i32.const 1073741824) - ) - (get_local $4) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 193) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:197:4 - (set_local $5 - ;;@ ~lib/allocator/tlsf.ts:197:23 - (if (result i32) - (i32.eqz - (tee_local $4 - ;;@ ~lib/allocator/tlsf.ts:197:30 - (call $~lib/allocator/tlsf/Block#get:right - (get_local $1) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 197) - (i32.const 23) - ) - (unreachable) - ) - (get_local $4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:198:4 - (set_local $6 - ;;@ ~lib/allocator/tlsf.ts:198:20 - (i32.load - (get_local $5) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:201:4 - (if - ;;@ ~lib/allocator/tlsf.ts:201:8 - (i32.and - (get_local $6) - ;;@ ~lib/allocator/tlsf.ts:201:20 - (i32.const 1) - ) - ;;@ ~lib/allocator/tlsf.ts:201:26 - (block - ;;@ ~lib/allocator/tlsf.ts:202:11 - (call $~lib/allocator/tlsf/Root#remove - ;;@ ~lib/allocator/tlsf.ts:202:6 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:202:18 - (get_local $5) - ) - ;;@ ~lib/allocator/tlsf.ts:203:6 - (i32.store - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:203:19 - (tee_local $2 - (i32.add - ;;@ ~lib/allocator/tlsf.ts:203:20 - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:203:33 - (i32.add - (i32.const 8) - ;;@ ~lib/allocator/tlsf.ts:203:46 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:203:47 - (get_local $6) - ;;@ ~lib/allocator/tlsf.ts:203:59 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:203:60 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:204:6 - (set_local $5 - ;;@ ~lib/allocator/tlsf.ts:204:14 - (call $~lib/allocator/tlsf/Block#get:right - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:205:6 - (set_local $6 - ;;@ ~lib/allocator/tlsf.ts:205:18 - (i32.load - (get_local $5) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:210:4 - (if - ;;@ ~lib/allocator/tlsf.ts:210:8 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:210:20 - (i32.const 2) - ) - ;;@ ~lib/allocator/tlsf.ts:210:31 - (block - ;;@ ~lib/allocator/tlsf.ts:211:6 - (set_local $4 - ;;@ ~lib/allocator/tlsf.ts:211:24 - (if (result i32) - (i32.eqz - (tee_local $4 - ;;@ ~lib/allocator/tlsf.ts:211:31 - (call $~lib/allocator/tlsf/Block#get:left - (get_local $1) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 211) - (i32.const 24) - ) - (unreachable) - ) - (get_local $4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:212:6 - (set_local $7 - ;;@ ~lib/allocator/tlsf.ts:212:21 - (i32.load - (get_local $4) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:213:6 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:213:13 - (i32.and - (get_local $7) - ;;@ ~lib/allocator/tlsf.ts:213:24 - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 213) - (i32.const 6) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:214:11 - (call $~lib/allocator/tlsf/Root#remove - ;;@ ~lib/allocator/tlsf.ts:214:6 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:214:18 - (get_local $4) - ) - ;;@ ~lib/allocator/tlsf.ts:215:6 - (i32.store - (get_local $4) - ;;@ ~lib/allocator/tlsf.ts:215:18 - (tee_local $7 - (i32.add - ;;@ ~lib/allocator/tlsf.ts:215:19 - (get_local $7) - ;;@ ~lib/allocator/tlsf.ts:215:31 - (i32.add - (i32.const 8) - ;;@ ~lib/allocator/tlsf.ts:215:44 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:215:45 - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:215:57 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:215:58 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:216:6 - (set_local $1 - ;;@ ~lib/allocator/tlsf.ts:216:14 - (get_local $4) - ) - ;;@ ~lib/allocator/tlsf.ts:217:6 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:217:18 - (get_local $7) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:221:4 - (i32.store - (get_local $5) - ;;@ ~lib/allocator/tlsf.ts:221:17 - (i32.or - (get_local $6) - ;;@ ~lib/allocator/tlsf.ts:221:29 - (i32.const 2) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:222:9 - (call $~lib/allocator/tlsf/Root#setJump - ;;@ ~lib/allocator/tlsf.ts:222:4 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:222:17 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:222:24 - (get_local $5) - ) - ;;@ ~lib/allocator/tlsf.ts:225:4 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:225:11 - (i32.and - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:225:23 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:225:24 - (i32.const 3) - (i32.const -1) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:226:4 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:226:11 - (if (result i32) - (tee_local $7 - (i32.ge_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:226:19 - (i32.const 16) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:226:37 - (i32.lt_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:226:44 - (i32.const 1073741824) - ) - (get_local $7) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 226) - (i32.const 4) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:230:4 - (if - ;;@ ~lib/allocator/tlsf.ts:230:8 - (i32.lt_u - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:230:15 - (i32.const 256) - ) - ;;@ ~lib/allocator/tlsf.ts:230:24 - (block - ;;@ ~lib/allocator/tlsf.ts:231:6 - (set_local $8 - ;;@ ~lib/allocator/tlsf.ts:231:11 - (i32.const 0) - ) - ;;@ ~lib/allocator/tlsf.ts:232:6 - (set_local $9 - ;;@ ~lib/allocator/tlsf.ts:232:11 - (i32.div_u - ;;@ ~lib/allocator/tlsf.ts:232:17 - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:232:24 - (i32.const 8) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:233:11 - (block - ;;@ ~lib/allocator/tlsf.ts:234:6 - (set_local $8 - ;;@ ~lib/allocator/tlsf.ts:234:11 - (call $~lib/allocator/tlsf/fls - ;;@ ~lib/allocator/tlsf.ts:234:22 - (get_local $3) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:235:6 - (set_local $9 - ;;@ ~lib/allocator/tlsf.ts:235:11 - (i32.xor - ;;@ ~lib/allocator/tlsf.ts:235:17 - (i32.shr_u - ;;@ ~lib/allocator/tlsf.ts:235:18 - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:235:26 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:235:27 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:235:32 - (i32.const 5) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:235:44 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:235:45 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:235:50 - (i32.const 5) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:236:6 - (set_local $8 - (i32.sub - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:236:12 - (i32.sub - (i32.const 8) - ;;@ ~lib/allocator/tlsf.ts:236:22 - (i32.const 1) - ) - ) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:240:4 - (set_local $10 - ;;@ ~lib/allocator/tlsf.ts:240:20 - (call $~lib/allocator/tlsf/Root#getHead - ;;@ ~lib/allocator/tlsf.ts:240:15 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:240:28 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:240:32 - (get_local $9) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:241:4 - (i32.store offset=4 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:241:17 - (i32.const 0) - ) - ;;@ ~lib/allocator/tlsf.ts:242:4 - (i32.store offset=8 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:242:17 - (get_local $10) - ) - ;;@ ~lib/allocator/tlsf.ts:243:4 - (if - ;;@ ~lib/allocator/tlsf.ts:243:8 - (get_local $10) - ;;@ ~lib/allocator/tlsf.ts:243:14 - (i32.store offset=4 - (get_local $10) - ;;@ ~lib/allocator/tlsf.ts:243:26 - (get_local $1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:244:9 - (call $~lib/allocator/tlsf/Root#setHead - ;;@ ~lib/allocator/tlsf.ts:244:4 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:244:17 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:244:21 - (get_local $9) - ;;@ ~lib/allocator/tlsf.ts:244:25 - (get_local $1) - ) - ;;@ ~lib/allocator/tlsf.ts:247:4 - (i32.store - (get_local $0) - (i32.or - (i32.load - (get_local $0) - ) - ;;@ ~lib/allocator/tlsf.ts:247:18 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:247:19 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:247:24 - (get_local $8) - ) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:248:9 - (call $~lib/allocator/tlsf/Root#setSLMap - ;;@ ~lib/allocator/tlsf.ts:248:4 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:248:18 - (get_local $8) - ;;@ ~lib/allocator/tlsf.ts:248:22 - (i32.or - ;;@ ~lib/allocator/tlsf.ts:248:27 - (call $~lib/allocator/tlsf/Root#getSLMap - ;;@ ~lib/allocator/tlsf.ts:248:22 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:248:36 - (get_local $8) - ) - ;;@ ~lib/allocator/tlsf.ts:248:42 - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:248:43 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:248:48 - (get_local $9) - ) - ) - ) - ) - (func $~lib/allocator/tlsf/free_memory (; 20 ;) (type $iv) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - ;;@ ~lib/allocator/tlsf.ts:492:2 - (if - ;;@ ~lib/allocator/tlsf.ts:492:6 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:492:12 - (block - ;;@ ~lib/allocator/tlsf.ts:493:4 - (set_local $1 - ;;@ ~lib/allocator/tlsf.ts:493:15 - (get_global $~lib/allocator/tlsf/ROOT) - ) - ;;@ ~lib/allocator/tlsf.ts:494:4 - (if - ;;@ ~lib/allocator/tlsf.ts:494:8 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:494:14 - (block - ;;@ ~lib/allocator/tlsf.ts:495:6 - (set_local $2 - ;;@ ~lib/allocator/tlsf.ts:495:18 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:495:36 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:495:43 - (i32.const 8) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:496:6 - (set_local $3 - ;;@ ~lib/allocator/tlsf.ts:496:22 - (i32.load - (get_local $2) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:497:6 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:497:13 - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:497:14 - (i32.and - ;;@ ~lib/allocator/tlsf.ts:497:15 - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:497:27 - (i32.const 1) - ) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 497) - (i32.const 6) - ) - (unreachable) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:498:6 - (i32.store - (get_local $2) - ;;@ ~lib/allocator/tlsf.ts:498:19 - (i32.or - (get_local $3) - ;;@ ~lib/allocator/tlsf.ts:498:31 - (i32.const 1) - ) - ) - ;;@ ~lib/allocator/tlsf.ts:499:11 - (call $~lib/allocator/tlsf/Root#insert - ;;@ ~lib/allocator/tlsf.ts:499:6 - (get_local $1) - ;;@ ~lib/allocator/tlsf.ts:499:18 - (i32.sub - ;;@ ~lib/allocator/tlsf.ts:499:36 - (get_local $0) - ;;@ ~lib/allocator/tlsf.ts:499:43 - (i32.const 8) - ) - ) - ) - ) - ) - ) - ) - (func $assembly/ugc/gc_free_fn (; 21 ;) (type $iiv) (param $0 i32) (param $1 i32) - (local $2 i32) - ;;@ assembly/ugc.ts:291:2 - (set_local $2 - ;;@ assembly/ugc.ts:291:16 - (i32.load - ;;@ assembly/ugc.ts:291:26 - (i32.add - (get_local $1) - ;;@ assembly/ugc.ts:291:54 - (i32.const 8) - ) - ) - ) - ;;@ assembly/ugc.ts:296:2 - (call $~lib/allocator/tlsf/free_memory - ;;@ assembly/ugc.ts:296:14 - (get_local $1) - ) - ) - (func $assembly/ugc/Control#step (; 22 ;) (type $iv) (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - ;;@ assembly/ugc.ts:165:4 - (block $break|0 - (block $case2|0 - (block $case1|0 - (block $case0|0 - (set_local $2 - ;;@ assembly/ugc.ts:165:12 - (i32.load8_u offset=28 - (get_local $0) - ) - ) - (br_if $case0|0 - (i32.eq - (get_local $2) - ;;@ assembly/ugc.ts:167:11 - (i32.const 0) - ) - ) - (br_if $case1|0 - (i32.eq - (get_local $2) - ;;@ assembly/ugc.ts:172:11 - (i32.const 1) - ) - ) - (br_if $case2|0 - (i32.eq - (get_local $2) - ;;@ assembly/ugc.ts:194:11 - (i32.const 2) - ) - ) - (br $break|0) - ) - ;;@ assembly/ugc.ts:168:8 - (call $assembly/ugc/gc_scan_fn - ;;@ assembly/ugc.ts:168:19 - (get_local $0) - ;;@ assembly/ugc.ts:168:25 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:169:8 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:169:21 - (i32.const 1) - ) - ;;@ assembly/ugc.ts:170:8 - (br $break|0) - ) - ;;@ assembly/ugc.ts:173:8 - (set_local $1 - ;;@ assembly/ugc.ts:173:14 - (call $assembly/ugc/ObjectHeader#get:next - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ;;@ assembly/ugc.ts:174:8 - (set_local $3 - ;;@ assembly/ugc.ts:174:20 - (i32.load8_u offset=29 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:176:8 - (if - ;;@ assembly/ugc.ts:176:12 - (i32.ne - (get_local $1) - ;;@ assembly/ugc.ts:176:19 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:176:28 - (block - ;;@ assembly/ugc.ts:177:10 - (i32.store offset=24 - (get_local $0) - ;;@ assembly/ugc.ts:177:26 - (get_local $1) - ) - ;;@ assembly/ugc.ts:178:10 - (call $assembly/ugc/ObjectHeader#set:color - (get_local $1) - ;;@ assembly/ugc.ts:178:22 - (i32.and - (i32.xor - (get_local $3) - ;;@ assembly/ugc.ts:178:30 - (i32.const 1) - ) - (i32.const 255) - ) - ) - ;;@ assembly/ugc.ts:179:10 - (call $assembly/ugc/gc_scan_fn - ;;@ assembly/ugc.ts:179:21 - (get_local $0) - ;;@ assembly/ugc.ts:179:27 - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:180:15 - (block - ;;@ assembly/ugc.ts:181:10 - (call $assembly/ugc/gc_scan_fn - ;;@ assembly/ugc.ts:181:21 - (get_local $0) - ;;@ assembly/ugc.ts:181:27 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:182:10 - (set_local $1 - ;;@ assembly/ugc.ts:182:16 - (call $assembly/ugc/ObjectHeader#get:next - (i32.load offset=24 - (get_local $0) - ) - ) - ) - ;;@ assembly/ugc.ts:183:10 - (if - ;;@ assembly/ugc.ts:183:14 - (i32.eq - (get_local $1) - ;;@ assembly/ugc.ts:183:21 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:183:30 - (block - ;;@ assembly/ugc.ts:184:12 - (set_local $4 - ;;@ assembly/ugc.ts:184:23 - (i32.load offset=16 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:185:12 - (i32.store offset=16 - (get_local $0) - ;;@ assembly/ugc.ts:185:24 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:186:12 - (i32.store offset=20 - (get_local $0) - ;;@ assembly/ugc.ts:186:22 - (get_local $4) - ) - ;;@ assembly/ugc.ts:187:12 - (i32.store8 offset=29 - (get_local $0) - ;;@ assembly/ugc.ts:187:25 - (i32.xor - (get_local $3) - ;;@ assembly/ugc.ts:187:33 - (i32.const 1) - ) - ) - ;;@ assembly/ugc.ts:188:12 - (i32.store offset=24 - (get_local $0) - ;;@ assembly/ugc.ts:188:28 - (i32.load - ;;@ assembly/ugc.ts:188:53 - (get_local $4) - ) - ) - ;;@ assembly/ugc.ts:189:12 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:189:25 - (i32.const 2) - ) - ) - ) - ) - ) - ;;@ assembly/ugc.ts:192:8 - (br $break|0) - ) - ;;@ assembly/ugc.ts:195:8 - (set_local $1 - ;;@ assembly/ugc.ts:195:14 - (i32.load offset=24 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:196:8 - (if - ;;@ assembly/ugc.ts:196:12 - (i32.ne - (get_local $1) - ;;@ assembly/ugc.ts:196:19 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:196:28 - (block - ;;@ assembly/ugc.ts:197:10 - (i32.store offset=24 - (get_local $0) - ;;@ assembly/ugc.ts:197:26 - (call $assembly/ugc/ObjectHeader#get:next - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:198:10 - (call $assembly/ugc/gc_free_fn - ;;@ assembly/ugc.ts:198:21 - (get_local $0) - ;;@ assembly/ugc.ts:198:27 - (get_local $1) - ) - ) - ;;@ assembly/ugc.ts:199:15 - (block - ;;@ assembly/ugc.ts:200:18 - (call $assembly/ugc/ObjectHeader#clear - ;;@ assembly/ugc.ts:200:10 - (i32.load offset=20 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:201:10 - (i32.store8 offset=28 - (get_local $0) - ;;@ assembly/ugc.ts:201:23 - (i32.const 0) - ) - ) - ) - ;;@ assembly/ugc.ts:203:8 - (br $break|0) - ) - ) - (func $assembly/ugc/Control#collect (; 23 ;) (type $iv) (param $0 i32) - ;;@ assembly/ugc.ts:217:4 - (if - ;;@ assembly/ugc.ts:217:8 - (i32.eq - (i32.load8_u offset=28 - (get_local $0) - ) - ;;@ assembly/ugc.ts:217:22 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:217:28 - (call $assembly/ugc/Control#step - ;;@ assembly/ugc.ts:218:6 - (get_local $0) - ) - ) - ;;@ assembly/ugc.ts:220:4 - (block $break|0 - (loop $continue|0 - (if - ;;@ assembly/ugc.ts:220:11 - (i32.ne - (i32.load8_u offset=28 - (get_local $0) - ) - ;;@ assembly/ugc.ts:220:25 - (i32.const 0) - ) - (block - ;;@ assembly/ugc.ts:220:31 - (call $assembly/ugc/Control#step - ;;@ assembly/ugc.ts:221:6 - (get_local $0) - ) - (br $continue|0) - ) - ) - ) - ) - ) - (func $assembly/ugc/gc_collect (; 24 ;) (type $v) - (local $0 i32) - ;;@ assembly/ugc.ts:265:2 - (set_local $0 - ;;@ assembly/ugc.ts:265:15 - (call $assembly/ugc/Control#get:paused - (get_global $assembly/ugc/GC) - ) - ) - ;;@ assembly/ugc.ts:266:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:266:14 - (i32.const 0) - ) - ;;@ assembly/ugc.ts:267:5 - (call $assembly/ugc/Control#collect - ;;@ assembly/ugc.ts:267:2 - (get_global $assembly/ugc/GC) - ) - ;;@ assembly/ugc.ts:268:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:268:14 - (get_local $0) - ) - ) - (func $assembly/ugc/gc_pause (; 25 ;) (type $v) - ;;@ assembly/ugc.ts:255:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:255:14 - (i32.const 1) - ) - ) - (func $assembly/ugc/gc_resume (; 26 ;) (type $v) - ;;@ assembly/ugc.ts:260:2 - (call $assembly/ugc/Control#set:paused - (get_global $assembly/ugc/GC) - ;;@ assembly/ugc.ts:260:14 - (i32.const 0) - ) - ) - (func $start (; 27 ;) (type $v) - ;;@ ~lib/allocator/tlsf.ts:122:0 - (if - (i32.eqz - ;;@ ~lib/allocator/tlsf.ts:122:7 - (i32.le_s - (i32.shl - ;;@ ~lib/allocator/tlsf.ts:122:8 - (i32.const 1) - ;;@ ~lib/allocator/tlsf.ts:122:13 - (i32.const 5) - ) - ;;@ ~lib/allocator/tlsf.ts:122:25 - (i32.const 32) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 122) - (i32.const 0) - ) - (unreachable) - ) - ) - (set_global $assembly/ugc/GC - ;;@ assembly/ugc.ts:247:17 - (call $assembly/ugc/Control.create - ;;@ assembly/ugc.ts:247:24 - (get_global $HEAP_BASE) - ) - ) - ) -) diff --git a/examples/ugc/package.json b/examples/ugc/package.json deleted file mode 100644 index 705c080f..00000000 --- a/examples/ugc/package.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "name": "@assemblyscript/ugc", - "version": "1.0.0", - "private": true, - "scripts": { - "asbuild": "npm run asbuild:untouched && npm run asbuild:optimized", - "asbuild:untouched": "asc assembly/index.ts -b build/untouched.wasm -t build/untouched.wat --validate --sourceMap --measure", - "asbuild:optimized": "asc -O3 assembly/index.ts -b build/optimized.wasm -t build/optimized.wat --validate --noDebug --noAssert --sourceMap --measure", - "test": "node tests" - } -} diff --git a/examples/ugc/tests/index.js b/examples/ugc/tests/index.js deleted file mode 100644 index 4096409e..00000000 --- a/examples/ugc/tests/index.js +++ /dev/null @@ -1,30 +0,0 @@ -var fs = require("fs"); - -// NOTE that this doesn't do anything useful, yet - -var ugc = new WebAssembly.Instance(new WebAssembly.Module(fs.readFileSync(__dirname + "/../build/untouched.wasm")), { - env: { abort: function(msg, file, line, column) { - console.log("abort called at " + line + ":" + column); - } } -}).exports; - -function mem(memory, offset, count) { - if (!offset) offset = 0; - if (!count) count = 1024; - var mem = new Uint8Array(memory.buffer, offset); - var stackTop = new Uint32Array(memory.buffer, 4, 1)[0]; - var hex = []; - for (var i = 0; i < count; ++i) { - var o = (offset + i).toString(16); - while (o.length < 3) o = "0" + o; - if ((i & 15) === 0) { - hex.push("\n" + o + ":"); - } - var h = mem[i].toString(16); - if (h.length < 2) h = "0" + h; - hex.push(h); - } - console.log(hex.join(" ") + " ..."); -} - -mem(ugc.memory, 0, 1024); diff --git a/lib/loader/index.d.ts b/lib/loader/index.d.ts index 0f89388a..c9476c08 100644 --- a/lib/loader/index.d.ts +++ b/lib/loader/index.d.ts @@ -61,9 +61,11 @@ interface ASUtil { /** Creates a typed array in the module's memory and returns its pointer. */ newArray(ctor: TypedArrayConstructor, length: number, unsafe?: boolean): number; /** Gets a view on a typed array in the module's memory by its pointer. */ - getArray(ctor: TypedArrayConstructor, ptr: number): TypedArray; + getArray(ctor: TypedArrayConstructor, ptr: number): T; /** Frees a typed array in the module's memory. Must not be accessed anymore afterwards. */ freeArray(ptr: number): void; + /** Gets a function by its pointer. */ + getFunction(ptr: number): (...args: any[]) => R; } /** Instantiates an AssemblyScript module using the specified imports. */ diff --git a/lib/loader/index.js b/lib/loader/index.js index 245aebf2..f6da5730 100644 --- a/lib/loader/index.js +++ b/lib/loader/index.js @@ -152,6 +152,30 @@ function postInstantiate(baseModule, instance) { baseModule.freeArray = freeArray; + // Reference the table and remember where to insert the next function + var table = exports.table; + + /** Creates a new function in the module's table and returns its pointer. */ + function newFunction(fn) { + var index = table.length; + table.grow(1); + table.set(index, fn); + return index; + } + + baseModule.newFunction = newFunction; + + /** Gets a function by its pointer. */ + function getFunction(ptr) { + var fn = table.get(ptr); + return (...args) => { + exports._setargc(args.length); + return fn(...args); + }; + } + + baseModule.getFunction = getFunction; + // Demangle exports and provide the usual utility on the prototype return demangle(instance.exports, Object.defineProperties(baseModule, { I8: { get: function() { checkMem(); return I8; } }, @@ -240,7 +264,9 @@ function demangle(exports, baseModule) { enumerable: true }); } - } else curr[name] = function(...args) { return elem(this.this, ...args); }; + } else { + curr[name] = wrapFunction(elem); + } } else { if (/^(get|set):/.test(name)) { if (!hasOwnProperty(curr, name = name.substring(4))) { @@ -250,9 +276,25 @@ function demangle(exports, baseModule) { enumerable: true }); } - } else curr[name] = elem; + } else if (typeof elem === "function") { + curr[name] = wrapFunction(elem); + } else { + curr[name] = elem; + } } } + + function wrapFunction(fn) { + var ret = function(...args) { + exports._setargc(args.length); + return fn(...args); + }; + // adding a function to the table with `newFunction` is limited to actual exported WebAssembly + // functions, hence we can't use the wrapper for that and instead need to pass a workaround: + ret.constructor = fn; + return ret; + } + return module; } diff --git a/lib/loader/tests/assembly/index.ts b/lib/loader/tests/assembly/index.ts index 76a1ef3f..98a26f59 100644 --- a/lib/loader/tests/assembly/index.ts +++ b/lib/loader/tests/assembly/index.ts @@ -50,3 +50,13 @@ export function sum(arr: Int32Array): i32 { for (let i = 0, k = arr.length; i < k; ++i) v += arr[i]; return v; } + +export function varadd(a: i32 = 1, b: i32 = 2): i32 { + return a + b; +} + +export const varadd_ptr = varadd; + +export function calladd(fn: (a: i32, b: i32) => i32, a: i32, b: i32): i32 { + return fn(a, b); +} diff --git a/lib/loader/tests/build/untouched.wasm b/lib/loader/tests/build/untouched.wasm index 600738cc..18ec0b8e 100644 Binary files a/lib/loader/tests/build/untouched.wasm and b/lib/loader/tests/build/untouched.wasm differ diff --git a/lib/loader/tests/index.js b/lib/loader/tests/index.js index c6df112a..3b331b80 100644 --- a/lib/loader/tests/index.js +++ b/lib/loader/tests/index.js @@ -18,8 +18,6 @@ assert(proto.I32 instanceof Int32Array); assert(proto.U32 instanceof Uint32Array); assert(proto.F32 instanceof Float32Array); assert(proto.F64 instanceof Float64Array); -assert(typeof proto.newString === "function"); -assert(typeof proto.getString === "function"); // should export memory assert(module.memory instanceof WebAssembly.Memory); @@ -46,3 +44,18 @@ assert.deepEqual(module.getArray(Int32Array, ptr), arr); module.freeArray(ptr); var ptr2 = module.newArray(new Int32Array(arr)); assert.strictEqual(ptr, ptr2); + +// should be able to just call a function with variable arguments +assert.strictEqual(module.varadd(), 3); +assert.strictEqual(module.varadd(2, 3), 5); +assert.strictEqual(module.varadd(2), 4); + +// should be able to get a function from the table and just call it with variable arguments +var fn = module.getFunction(module.varadd_ptr); +assert.strictEqual(fn(), 3); +assert.strictEqual(fn(2, 3), 5); +assert.strictEqual(fn(2), 4); + +// should be able to create a new function and call it from WASM +ptr = module.newFunction(module.varadd.constructor); // must be an actual exported wasm function +assert.strictEqual(module.calladd(ptr, 2, 3), 5); diff --git a/lib/parse/build/index.wat b/lib/parse/build/index.wat index 00363158..ff72cf7c 100644 --- a/lib/parse/build/index.wat +++ b/lib/parse/build/index.wat @@ -10,6 +10,9 @@ (type $I (func (result i64))) (type $iv (func (param i32))) (type $FUNCSIG$i (func (result i32))) + (import "env" "memory" (memory $0 0)) + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "options" "onSection" (func $assembly/options/onSection (param i32 i32 i32 i32 i32) (result i32))) (import "options" "onType" (func $assembly/options/onType (param i32 i32))) (import "options" "onTypeParam" (func $assembly/options/onTypeParam (param i32 i32 i32))) @@ -29,7 +32,6 @@ (import "options" "onFunctionName" (func $assembly/options/onFunctionName (param i32 i32 i32))) (import "options" "onLocalName" (func $assembly/options/onLocalName (param i32 i32 i32 i32))) (import "options" "onSourceMappingURL" (func $assembly/options/onSourceMappingURL (param i32 i32))) - (import "env" "memory" (memory $0 0)) (global $assembly/index/off (mut i32) (i32.const 0)) (global $src/common/SectionId.Custom (mut i32) (i32.const 0)) (global $src/common/SectionId.Type (mut i32) (i32.const 1)) @@ -57,6 +59,7 @@ (global $src/common/NameType.Function (mut i32) (i32.const 1)) (global $src/common/NameType.Local (mut i32) (i32.const 2)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "parse" (func $assembly/index/parse)) (func $assembly/index/readVaruint (; 19 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) diff --git a/lib/parse/index.js b/lib/parse/index.js index 51d2913e..256120df 100644 --- a/lib/parse/index.js +++ b/lib/parse/index.js @@ -1,2 +1,2 @@ -!function(A,B){"object"==typeof exports&&"object"==typeof module?module.exports=B():"function"==typeof define&&define.amd?define([],B):"object"==typeof exports?exports.asparse=B():A.asparse=B()}("undefined"!=typeof self?self:this,function(){return function(A){var B={};function E(Q){if(B[Q])return B[Q].exports;var C=B[Q]={i:Q,l:!1,exports:{}};return A[Q].call(C.exports,C,C.exports,E),C.l=!0,C.exports}return E.m=A,E.c=B,E.d=function(A,B,Q){E.o(A,B)||Object.defineProperty(A,B,{configurable:!1,enumerable:!0,get:Q})},E.r=function(A){Object.defineProperty(A,"__esModule",{value:!0})},E.n=function(A){var B=A&&A.__esModule?function(){return A.default}:function(){return A};return E.d(B,"a",B),B},E.o=function(A,B){return Object.prototype.hasOwnProperty.call(A,B)},E.p="",E(E.s=2)}([function(A,B,E){"use strict";B.__esModule=!0,function(A){A[A.i32=127]="i32",A[A.i64=126]="i64",A[A.f32=125]="f32",A[A.f64=124]="f64",A[A.anyfunc=112]="anyfunc",A[A.func=96]="func",A[A.none=64]="none"}(B.Type||(B.Type={})),function(A){A[A.Custom=0]="Custom",A[A.Type=1]="Type",A[A.Import=2]="Import",A[A.Function=3]="Function",A[A.Table=4]="Table",A[A.Memory=5]="Memory",A[A.Global=6]="Global",A[A.Export=7]="Export",A[A.Start=8]="Start",A[A.Element=9]="Element",A[A.Code=10]="Code",A[A.Data=11]="Data"}(B.SectionId||(B.SectionId={})),function(A){A[A.Function=0]="Function",A[A.Table=1]="Table",A[A.Memory=2]="Memory",A[A.Global=3]="Global"}(B.ExternalKind||(B.ExternalKind={})),function(A){A[A.Module=0]="Module",A[A.Function=1]="Function",A[A.Local=2]="Local"}(B.NameType||(B.NameType={})),B.MAX_PAGES=65535,B.MAX_ELEMS=4294967295,function(A){A[A.end=11]="end",A[A.get_global=35]="get_global",A[A.i32_const=65]="i32_const",A[A.i64_const=66]="i64_const",A[A.f32_const=67]="f32_const",A[A.f64_const=68]="f64_const"}(B.Opcode||(B.Opcode={}))},function(A,B,E){"use strict";B.__esModule=!0;var Q=E(0);B.Type=Q.Type,B.SectionId=Q.SectionId,B.ExternalKind=Q.ExternalKind;var C=null;B.parse=function A(B,E){E||(E={}),C||(C=new WebAssembly.Module(function(A){var B=A.length;if(B){for(var E=0,Q=B;--Q%4>1&&61===A.charCodeAt(Q);)++E;B=Math.ceil(3*B)/4-E}for(var C=new Uint8Array(B),o=0,I=0,e=0,t=0,r=A.length;t1)break;if(void 0===(g=n[g]))throw Error();switch(o){case 0:e=g,o=1;break;case 1:C[I++]=e<<2|(48&g)>>4,e=g,o=2;break;case 2:C[I++]=(15&e)<<4|(60&g)>>2,e=g,o=3;break;case 3:C[I++]=(3&e)<<6|g,o=0}}if(1===o)throw Error();return C}("AGFzbQEAAAABQQtgAn9/AGABfwF/YAV/f39/fwF/YAN/f38AYAZ/f39/f38AYAV/f39/fwBgBH9/f38AYAAAYAABfmABfwBgAAF/Aq4DFAdvcHRpb25zCW9uU2VjdGlvbgACB29wdGlvbnMGb25UeXBlAAAHb3B0aW9ucwtvblR5cGVQYXJhbQADB29wdGlvbnMMb25UeXBlUmV0dXJuAAMHb3B0aW9ucwhvbkltcG9ydAAEB29wdGlvbnMQb25GdW5jdGlvbkltcG9ydAAAB29wdGlvbnMNb25UYWJsZUltcG9ydAAFB29wdGlvbnMOb25NZW1vcnlJbXBvcnQABgdvcHRpb25zDm9uR2xvYmFsSW1wb3J0AAMHb3B0aW9ucwpvbkZ1bmN0aW9uAAAHb3B0aW9ucwdvblRhYmxlAAUHb3B0aW9ucwhvbk1lbW9yeQAGB29wdGlvbnMIb25HbG9iYWwAAwdvcHRpb25zCG9uRXhwb3J0AAUHb3B0aW9ucwdvblN0YXJ0AAkHb3B0aW9ucwxvbk1vZHVsZU5hbWUAAAdvcHRpb25zDm9uRnVuY3Rpb25OYW1lAAMHb3B0aW9ucwtvbkxvY2FsTmFtZQAGB29wdGlvbnMSb25Tb3VyY2VNYXBwaW5nVVJMAAADZW52Bm1lbW9yeQIAAAMHBgoBCAcABwaHARp/AUEAC38BQQALfwFBAQt/AUECC38BQQMLfwFBBAt/AUEFC38BQQYLfwFBBwt/AUEIC38BQQkLfwFBCgt/AUELC38BQQALfwFBAQt/AUECC38BQQMLfwFBCwt/AUEjC38BQcEAC38BQcIAC38BQcMAC38BQcQAC38BQQALfwFBAQt/AUECCwcSAgZtZW1vcnkCAAVwYXJzZQAXCsIOBkQBBH8jACEAAkADQCAAIgFBAWohACACIAEtAAAiAUH/AHEgA3RyIQIgAUGAAXFFDQEgA0EHaiEDDAAACwALIAAkACACC2ABBX8jACECA0AgAiIEQQFqIQIgAyAELQAAIgVB/wBxIAF0ciEDIAFBB2ohASAFQYABcQ0ACyACJAAgA0F/IAF0ciECIAEgAEkiBARAIAVBwABxQQBHIQQLIAIgAyAEGwtmAgJ/BH4jACEBA0AgASIAQQFqIQEgAyAAMQAAIgRC/wCDIAKGhCEDIAJCB3whAiAEQoABg0IAUg0ACyABJAAgA0J/IAKGhCEFIAJCwABUIgAEQCAEQsAAg0IAUiEACyAFIAMgABsLmQEBAn8CQAJAAkACQAJAAkAjACIBLQAAIQAgAUEBaiQAIAAjE0cEQCAAIxRGDQEgACMVRg0CIAAjFkYNAyAAIxJGDQQMBQtBIBAUGgwFCxAVGgwECyMAIgAoAgAaIABBBGokAAwDCyMAIgApAwAaIABBCGokAAwCCxATGgwBCwALIwAiAS0AACEAIAFBAWokACAAIxFHBEAACwuTCwENfyAAJAAjACIGKAIAIQAgBkEEaiQAIABBgMLN6wZHBEAACyMAIgYoAgAhACAGQQRqJAAgAEEBRwRAAAsDQCMAIAFJBEAQEyECEBMhCEEAIQVBACEAIAIEQCACIwxLBEAACwUjACEEEBMhACMAIQUjACAAaiQAIAgjACAEa2shCAsgAiMAIgQgCCAFIAAQAEEBcQRAAkACQAJAAkACQAJAAkACQAJAAkACQCACIwJHBEAgAiMDRg0BIAIjBEYNAiACIwVGDQMgAiMGRg0EIAIjB0YNBSACIwhGDQYgAiMJRg0HIAIjAUYNCCACIwpGDQkgAiMLRg0JIAIjDEYNCQwKCxATIQICQEEAIQMDQCADIAJPDQEgA0EHEBRB/wBxEAEQEyEEAkBBACEHA0AgByAETw0BIAMgB0EHEBRB/wBxEAIgB0EBaiEHDAAACwALEBMhBwJAQQAhBQNAIAUgB08NASADIAVBBxAUQf8AcRADIAVBAWohBQwAAAsACyADQQFqIQMMAAALAAsMCgsQEyECAkBBACEDA0AgAyACTw0BEBMhByMAIQQjACAHaiQAEBMhCSMAIQUjACAJaiQAIwAiBi0AACEAIAZBAWokACADIAAgBCAHIAUgCRAEAkACQAJAAkACQCAAIgYjDUcEQCAGIw5GDQEgBiMPRg0CIAYjEEYNAwwECyALIgpBAWohCyAKEBMQBQwEC0EHEBRB/wBxIQYQEyEKIAwiAEEBaiEMIAAgBhATIgQgCkEBcQR/EBMFQX8LIgggChAGDAMLEBMhCCANIgZBAWohDSAGEBMiACAIQQFxBH8QEwVB//8DCyIKIAgQBwwCCyAOIghBAWohDiAIQQcQFEH/AHEQExAIDAELAAsgA0EBaiEDDAAACwALDAkLEBMhAgJAQQAhAwNAIAMgAk8NASALIgVBAWohCyAFEBMQCSADQQFqIQMMAAALAAsMCAsQEyECAkBBACEDA0AgAyACTw0BEBNB/wBxIQAQEyEFIAwiB0EBaiEMIAcgABATIgYgBUEBcQR/EBMFQX8LIgQgBRAKIANBAWohAwwAAAsACwwHCxATIQICQEEAIQMDQCADIAJPDQEQEyEEIA0iAEEBaiENIAAQEyIGIARBAXEEfxATBUH//wMLIgUgBBALIANBAWohAwwAAAsACwwGCxATIQICQEEAIQMDQCADIAJPDQFBBxAUQf8AcSEFEBMhCRAWIA4iBEEBaiEOIAQgBSAJEAwgA0EBaiEDDAAACwALDAULEBMhAgJAQQAhAwNAIAMgAk8NARATIQkjACEFIwAgCWokACMAIgYtAAAhACAGQQFqJAAgAyAAEBMgBSAJEA0gA0EBaiEDDAAACwALDAQLEBMQDgwDCyAAQQRGIgIEQCAFKAIAQe7CtasGRiECCyACBEAQEyECEBMhAyMAIQACQAJAAkACQCACIgQjF0cEQCAEIxhGDQEgBCMZRg0CDAMLEBMhBCMAIAQQDwwDCxATIQUCQEEAIQQDQCAEIAVPDQEQEyEJEBMhByMAIQIjACAHaiQAIAkgAiAHEBAgBEEBaiEEDAAACwALDAILEBMhBQJAQQAhBANAIAQgBU8NARATIQIQEyEHAkBBACEJA0AgCSAHTw0BEBMhChATIQgjACEGIwAgCGokACACIAogBiAIEBEgCUEBaiEJDAAACwALIARBAWohBAwAAAsACwwBCwALIAAgA2okAAwDBSAAQRBGIgAEQCAFKQMAQvPe1ZO3rNmm4QBRIQALIAAEQCAFQQhqKQMAQvDgpfP2rJWpzABRIQALIAAEQBATIQAjACEDIwAgAGokACADIAAQEgsLIAQgCGokAAwCCyMAIAhqJAAMAQsACwUjACAIaiQACwwBCwsjACABRwRAAAsLAwABCwAgEHNvdXJjZU1hcHBpbmdVUkwOaW5kZXgud2FzbS5tYXA=")));var Q=B.length,o=(Q+65535&-65536)>>16,I=new WebAssembly.Memory({initial:o}),e=new Uint8Array(I.buffer);e.set(B),A.readString=function(A,B){return function(A,B,E){if(E-B<1)return"";for(var Q=null,C=[],n=0,o=0;B191&&o<224?C[n++]=(31&o)<<6|63&A[B++]:o>239&&o<365?(o=((7&o)<<18|(63&A[B++])<<12|(63&A[B++])<<6|63&A[B++])-65536,C[n++]=55296+(o>>10),C[n++]=56320+(1023&o)):C[n++]=(15&o)<<12|(63&A[B++])<<6|63&A[B++],n>8191&&((Q||(Q=[])).push(String.fromCharCode.apply(String,C)),n=0);return Q?(n&&Q.push(String.fromCharCode.apply(String,C.slice(0,n))),Q.join("")):String.fromCharCode.apply(String,C.slice(0,n))}(e,A,A+B)};var t={env:{memory:I},options:{}};["onSection","onType","onTypeParam","onTypeReturn","onImport","onFunctionImport","onTableImport","onMemoryImport","onGlobalImport","onMemory","onFunction","onTable","onGlobal","onExport","onStart","onSourceMappingURL","onModuleName","onFunctionName","onLocalName"].forEach(function(A){return t.options[A]=E[A]||function(){}}),new WebAssembly.Instance(C,t).exports.parse(0,Q)};for(var n=new Array(123),o=0;o<64;)n[o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++},function(A,B,E){A.exports=E(1)}])}); +!function(A,Q){"object"==typeof exports&&"object"==typeof module?module.exports=Q():"function"==typeof define&&define.amd?define([],Q):"object"==typeof exports?exports.asparse=Q():A.asparse=Q()}("undefined"!=typeof self?self:this,function(){return function(A){var Q={};function E(I){if(Q[I])return Q[I].exports;var B=Q[I]={i:I,l:!1,exports:{}};return A[I].call(B.exports,B,B.exports,E),B.l=!0,B.exports}return E.m=A,E.c=Q,E.d=function(A,Q,I){E.o(A,Q)||Object.defineProperty(A,Q,{configurable:!1,enumerable:!0,get:I})},E.r=function(A){Object.defineProperty(A,"__esModule",{value:!0})},E.n=function(A){var Q=A&&A.__esModule?function(){return A.default}:function(){return A};return E.d(Q,"a",Q),Q},E.o=function(A,Q){return Object.prototype.hasOwnProperty.call(A,Q)},E.p="",E(E.s=2)}([function(A,Q,E){"use strict";Q.__esModule=!0,function(A){A[A.i32=127]="i32",A[A.i64=126]="i64",A[A.f32=125]="f32",A[A.f64=124]="f64",A[A.anyfunc=112]="anyfunc",A[A.func=96]="func",A[A.none=64]="none"}(Q.Type||(Q.Type={})),function(A){A[A.Custom=0]="Custom",A[A.Type=1]="Type",A[A.Import=2]="Import",A[A.Function=3]="Function",A[A.Table=4]="Table",A[A.Memory=5]="Memory",A[A.Global=6]="Global",A[A.Export=7]="Export",A[A.Start=8]="Start",A[A.Element=9]="Element",A[A.Code=10]="Code",A[A.Data=11]="Data"}(Q.SectionId||(Q.SectionId={})),function(A){A[A.Function=0]="Function",A[A.Table=1]="Table",A[A.Memory=2]="Memory",A[A.Global=3]="Global"}(Q.ExternalKind||(Q.ExternalKind={})),function(A){A[A.Module=0]="Module",A[A.Function=1]="Function",A[A.Local=2]="Local"}(Q.NameType||(Q.NameType={})),Q.MAX_PAGES=65535,Q.MAX_ELEMS=4294967295,function(A){A[A.end=11]="end",A[A.get_global=35]="get_global",A[A.i32_const=65]="i32_const",A[A.i64_const=66]="i64_const",A[A.f32_const=67]="f32_const",A[A.f64_const=68]="f64_const"}(Q.Opcode||(Q.Opcode={}))},function(A,Q,E){"use strict";Q.__esModule=!0;var I=E(0);Q.Type=I.Type,Q.SectionId=I.SectionId,Q.ExternalKind=I.ExternalKind;var B=null;Q.parse=function A(Q,E){E||(E={}),B||(B=new WebAssembly.Module(function(A){var Q=A.length;if(Q){for(var E=0,I=Q;--I%4>1&&61===A.charCodeAt(I);)++E;Q=Math.ceil(3*Q)/4-E}for(var B=new Uint8Array(Q),o=0,e=0,t=0,C=0,i=A.length;C1)break;if(void 0===(r=n[r]))throw Error();switch(o){case 0:t=r,o=1;break;case 1:B[e++]=t<<2|(48&r)>>4,t=r,o=2;break;case 2:B[e++]=(15&t)<<4|(60&r)>>2,t=r,o=3;break;case 3:B[e++]=(3&t)<<6|r,o=0}}if(1===o)throw Error();return B}("AGFzbQEAAAABQQtgAn9/AGABfwF/YAV/f39/fwF/YAN/f38AYAZ/f39/f38AYAV/f39/fwBgBH9/f38AYAAAYAABfmABfwBgAAF/Aq4DFAdvcHRpb25zCW9uU2VjdGlvbgACB29wdGlvbnMGb25UeXBlAAAHb3B0aW9ucwtvblR5cGVQYXJhbQADB29wdGlvbnMMb25UeXBlUmV0dXJuAAMHb3B0aW9ucwhvbkltcG9ydAAEB29wdGlvbnMQb25GdW5jdGlvbkltcG9ydAAAB29wdGlvbnMNb25UYWJsZUltcG9ydAAFB29wdGlvbnMOb25NZW1vcnlJbXBvcnQABgdvcHRpb25zDm9uR2xvYmFsSW1wb3J0AAMHb3B0aW9ucwpvbkZ1bmN0aW9uAAAHb3B0aW9ucwdvblRhYmxlAAUHb3B0aW9ucwhvbk1lbW9yeQAGB29wdGlvbnMIb25HbG9iYWwAAwdvcHRpb25zCG9uRXhwb3J0AAUHb3B0aW9ucwdvblN0YXJ0AAkHb3B0aW9ucwxvbk1vZHVsZU5hbWUAAAdvcHRpb25zDm9uRnVuY3Rpb25OYW1lAAMHb3B0aW9ucwtvbkxvY2FsTmFtZQAGB29wdGlvbnMSb25Tb3VyY2VNYXBwaW5nVVJMAAADZW52Bm1lbW9yeQIAAAMHBgoBCAcABwQEAXAAAQaHARp/AUEAC38BQQALfwFBAQt/AUECC38BQQMLfwFBBAt/AUEFC38BQQYLfwFBBwt/AUEIC38BQQkLfwFBCgt/AUELC38BQQALfwFBAQt/AUECC38BQQMLfwFBCwt/AUEjC38BQcEAC38BQcIAC38BQcMAC38BQcQAC38BQQALfwFBAQt/AUECCwcaAwZtZW1vcnkCAAV0YWJsZQEABXBhcnNlABcJBwEAQQALARgKwg4GRAEEfyMAIQACQANAIAAiAUEBaiEAIAIgAS0AACIBQf8AcSADdHIhAiABQYABcUUNASADQQdqIQMMAAALAAsgACQAIAILYAEFfyMAIQIDQCACIgRBAWohAiADIAQtAAAiBUH/AHEgAXRyIQMgAUEHaiEBIAVBgAFxDQALIAIkACADQX8gAXRyIQIgASAASSIEBEAgBUHAAHFBAEchBAsgAiADIAQbC2YCAn8EfiMAIQEDQCABIgBBAWohASADIAAxAAAiBEL/AIMgAoaEIQMgAkIHfCECIARCgAGDQgBSDQALIAEkACADQn8gAoaEIQUgAkLAAFQiAARAIARCwACDQgBSIQALIAUgAyAAGwuZAQECfwJAAkACQAJAAkACQCMAIgEtAAAhACABQQFqJAAgACMTRwRAIAAjFEYNASAAIxVGDQIgACMWRg0DIAAjEkYNBAwFC0EgEBQaDAULEBUaDAQLIwAiACgCABogAEEEaiQADAMLIwAiACkDABogAEEIaiQADAILEBMaDAELAAsjACIBLQAAIQAgAUEBaiQAIAAjEUcEQAALC5MLAQ1/IAAkACMAIgYoAgAhACAGQQRqJAAgAEGAws3rBkcEQAALIwAiBigCACEAIAZBBGokACAAQQFHBEAACwNAIwAgAUkEQBATIQIQEyEIQQAhBUEAIQAgAgRAIAIjDEsEQAALBSMAIQQQEyEAIwAhBSMAIABqJAAgCCMAIARrayEICyACIwAiBCAIIAUgABAAQQFxBEACQAJAAkACQAJAAkACQAJAAkACQAJAIAIjAkcEQCACIwNGDQEgAiMERg0CIAIjBUYNAyACIwZGDQQgAiMHRg0FIAIjCEYNBiACIwlGDQcgAiMBRg0IIAIjCkYNCSACIwtGDQkgAiMMRg0JDAoLEBMhAgJAQQAhAwNAIAMgAk8NASADQQcQFEH/AHEQARATIQQCQEEAIQcDQCAHIARPDQEgAyAHQQcQFEH/AHEQAiAHQQFqIQcMAAALAAsQEyEHAkBBACEFA0AgBSAHTw0BIAMgBUEHEBRB/wBxEAMgBUEBaiEFDAAACwALIANBAWohAwwAAAsACwwKCxATIQICQEEAIQMDQCADIAJPDQEQEyEHIwAhBCMAIAdqJAAQEyEJIwAhBSMAIAlqJAAjACIGLQAAIQAgBkEBaiQAIAMgACAEIAcgBSAJEAQCQAJAAkACQAJAIAAiBiMNRwRAIAYjDkYNASAGIw9GDQIgBiMQRg0DDAQLIAsiCkEBaiELIAoQExAFDAQLQQcQFEH/AHEhBhATIQogDCIAQQFqIQwgACAGEBMiBCAKQQFxBH8QEwVBfwsiCCAKEAYMAwsQEyEIIA0iBkEBaiENIAYQEyIAIAhBAXEEfxATBUH//wMLIgogCBAHDAILIA4iCEEBaiEOIAhBBxAUQf8AcRATEAgMAQsACyADQQFqIQMMAAALAAsMCQsQEyECAkBBACEDA0AgAyACTw0BIAsiBUEBaiELIAUQExAJIANBAWohAwwAAAsACwwICxATIQICQEEAIQMDQCADIAJPDQEQE0H/AHEhABATIQUgDCIHQQFqIQwgByAAEBMiBiAFQQFxBH8QEwVBfwsiBCAFEAogA0EBaiEDDAAACwALDAcLEBMhAgJAQQAhAwNAIAMgAk8NARATIQQgDSIAQQFqIQ0gABATIgYgBEEBcQR/EBMFQf//AwsiBSAEEAsgA0EBaiEDDAAACwALDAYLEBMhAgJAQQAhAwNAIAMgAk8NAUEHEBRB/wBxIQUQEyEJEBYgDiIEQQFqIQ4gBCAFIAkQDCADQQFqIQMMAAALAAsMBQsQEyECAkBBACEDA0AgAyACTw0BEBMhCSMAIQUjACAJaiQAIwAiBi0AACEAIAZBAWokACADIAAQEyAFIAkQDSADQQFqIQMMAAALAAsMBAsQExAODAMLIABBBEYiAgRAIAUoAgBB7sK1qwZGIQILIAIEQBATIQIQEyEDIwAhAAJAAkACQAJAIAIiBCMXRwRAIAQjGEYNASAEIxlGDQIMAwsQEyEEIwAgBBAPDAMLEBMhBQJAQQAhBANAIAQgBU8NARATIQkQEyEHIwAhAiMAIAdqJAAgCSACIAcQECAEQQFqIQQMAAALAAsMAgsQEyEFAkBBACEEA0AgBCAFTw0BEBMhAhATIQcCQEEAIQkDQCAJIAdPDQEQEyEKEBMhCCMAIQYjACAIaiQAIAIgCiAGIAgQESAJQQFqIQkMAAALAAsgBEEBaiEEDAAACwALDAELAAsgACADaiQADAMFIABBEEYiAARAIAUpAwBC897Vk7es2abhAFEhAAsgAARAIAVBCGopAwBC8OCl8/aslanMAFEhAAsgAARAEBMhACMAIQMjACAAaiQAIAMgABASCwsgBCAIaiQADAILIwAgCGokAAwBCwALBSMAIAhqJAALDAELCyMAIAFHBEAACwsDAAELACAQc291cmNlTWFwcGluZ1VSTA5pbmRleC53YXNtLm1hcA==")));var I=Q.length,o=(I+65535&-65536)>>16,e=new WebAssembly.Memory({initial:o}),t=new Uint8Array(e.buffer);t.set(Q),A.readString=function(A,Q){return function(A,Q,E){if(E-Q<1)return"";for(var I=null,B=[],n=0,o=0;Q191&&o<224?B[n++]=(31&o)<<6|63&A[Q++]:o>239&&o<365?(o=((7&o)<<18|(63&A[Q++])<<12|(63&A[Q++])<<6|63&A[Q++])-65536,B[n++]=55296+(o>>10),B[n++]=56320+(1023&o)):B[n++]=(15&o)<<12|(63&A[Q++])<<6|63&A[Q++],n>8191&&((I||(I=[])).push(String.fromCharCode.apply(String,B)),n=0);return I?(n&&I.push(String.fromCharCode.apply(String,B.slice(0,n))),I.join("")):String.fromCharCode.apply(String,B.slice(0,n))}(t,A,A+Q)};var C={env:{memory:e},options:{}};["onSection","onType","onTypeParam","onTypeReturn","onImport","onFunctionImport","onTableImport","onMemoryImport","onGlobalImport","onMemory","onFunction","onTable","onGlobal","onExport","onStart","onSourceMappingURL","onModuleName","onFunctionName","onLocalName"].forEach(function(A){return C.options[A]=E[A]||function(){}}),new WebAssembly.Instance(B,C).exports.parse(0,I)};for(var n=new Array(123),o=0;o<64;)n[o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++},function(A,Q,E){A.exports=E(1)}])}); //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/lib/parse/index.js.map b/lib/parse/index.js.map index 37de0bea..b66a9f3c 100644 --- a/lib/parse/index.js.map +++ b/lib/parse/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://asparse/webpack/universalModuleDefinition","webpack://asparse/webpack/bootstrap","webpack://asparse/./src/common.ts","webpack://asparse/./src/index.ts"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Type","SectionId","ExternalKind","NameType","MAX_PAGES","MAX_ELEMS","Opcode","common_1","compiled","parse","binary","options","WebAssembly","Module","string","length","charCodeAt","Math","ceil","buffer","Uint8Array","j","t","k","undefined","s64","Error","base64_decode","nBytes","nPages","memory","Memory","initial","set","readString","offset","start","end","parts","chunk","push","String","fromCharCode","apply","slice","join","utf8_read","imports","env","forEach","Instance","Array"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,IARA,CASC,oBAAAK,UAAAC,KAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAR,QAGA,IAAAC,EAAAK,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAV,YAUA,OANAW,EAAAH,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAS,GAAA,EAGAT,EAAAD,QA2CA,OAtCAO,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAxB,GACAmB,OAAAC,eAAApB,EAAA,cAAiDyB,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAzB,GACA,IAAAgB,EAAAhB,KAAA0B,WACA,WAA2B,OAAA1B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAM,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDtB,EAAAyB,EAAA,GAIAzB,IAAA0B,EAAA,kCCjEAjC,EAAA2B,YAAA,EAGA,SAAAO,GACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,uBACAA,IAAA,gBACAA,IAAA,gBAPA,CAQClC,EAAAkC,OAAAlC,EAAAkC,UAGD,SAAAC,GACAA,IAAA,mBACAA,IAAA,eACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,iBACAA,IAAA,qBACAA,IAAA,gBACAA,IAAA,gBAZA,CAaCnC,EAAAmC,YAAAnC,EAAAmC,eAGD,SAAAC,GACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBAJA,CAKCpC,EAAAoC,eAAApC,EAAAoC,kBAGD,SAAAC,GACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBAHA,CAICrC,EAAAqC,WAAArC,EAAAqC,cAEDrC,EAAAsC,UAAA,MAEAtC,EAAAuC,UAAA,WAGA,SAAAC,GAOAA,IAAA,cAYAA,IAAA,4BA2BAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BAjDA,CA6KCxC,EAAAwC,SAAAxC,EAAAwC,0CC/NDxC,EAAA2B,YAAA,EACA,IAAAc,EAAAlC,EAAA,GACAP,EAAAkC,KAAAO,EAAAP,KACAlC,EAAAmC,UAAAM,EAAAN,UACAnC,EAAAoC,aAAAK,EAAAL,aAEA,IAAAM,EAAA,KAgDA1C,EAAA2C,MA5CA,SAAAA,EAAAC,EAAAC,GACAA,IACAA,MAEAH,IACAA,EAAA,IAAAI,YAAAC,OA4EA,SAAAC,GACA,IAAAC,EAAAD,EAAAC,OACA,GAAAA,EAAA,CAEA,IADA,IAAAvB,EAAA,EAAAM,EAAAiB,IACAjB,EAAA,UAAAgB,EAAAE,WAAAlB,MACAN,EACAuB,EAAAE,KAAAC,KAAA,EAAAH,GAAA,EAAAvB,EAIA,IAFA,IAAA2B,EAAA,IAAAC,WAAAL,GACAM,EAAA,EAAArC,EAAA,EAAAsC,EAAA,EACA/C,EAAA,EAAAgD,EAAAT,EAAAC,OAAsCxC,EAAAgD,GAAO,CAC7C,IAAA3C,EAAAkC,EAAAE,WAAAzC,KACA,QAAAK,GAAAyC,EAAA,EACA,MACA,QAAAG,KAAA5C,EAAA6C,EAAA7C,IACA,MAAA8C,QACA,OAAAL,GACA,OACAC,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,KAAAsC,GAAA,MAAA1C,IAAA,EACA0C,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,MAAA,GAAAsC,IAAA,MAAA1C,IAAA,EACA0C,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,MAAA,EAAAsC,IAAA,EAAA1C,EACAyC,EAAA,GAKA,OAAAA,EACA,MAAAK,QACA,OAAAP,EAvHAQ,CAAA,02GAEA,IAAAC,EAAAlB,EAAAK,OACAc,GAAAD,EAAA,kBACAE,EAAA,IAAAlB,YAAAmB,QAAyCC,QAAAH,IACzCV,EAAA,IAAAC,WAAAU,EAAAX,QACAA,EAAAc,IAAAvB,GAEAD,EAAAyB,WAAA,SAAAC,EAAApB,GAAkD,OAiClD,SAAAI,EAAAiB,EAAAC,GAEA,GADAA,EAAAD,EACA,EACA,SAGA,IAFA,IAAAE,EAAA,KAAAC,KAAAhE,EAAA,EACA+C,EAAA,EACAc,EAAAC,IACAf,EAAAH,EAAAiB,MACA,IACAG,EAAAhE,KAAA+C,EAEAA,EAAA,KAAAA,EAAA,IACAiB,EAAAhE,MAAA,GAAA+C,IAAA,KAAAH,EAAAiB,KAEAd,EAAA,KAAAA,EAAA,KACAA,IAAA,EAAAA,IAAA,OAAAH,EAAAiB,OAAA,OAAAjB,EAAAiB,OAAA,KAAAjB,EAAAiB,MAAA,MACAG,EAAAhE,KAAA,OAAA+C,GAAA,IACAiB,EAAAhE,KAAA,YAAA+C,IAGAiB,EAAAhE,MAAA,GAAA+C,IAAA,OAAAH,EAAAiB,OAAA,KAAAjB,EAAAiB,KAEA7D,EAAA,QACA+D,WAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,IACAhE,EAAA,GAGA,OAAA+D,GACA/D,GACA+D,EAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAArE,KACA+D,EAAAO,KAAA,KAEAJ,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAArE,IAjEkDuE,CAAA3B,EAAAgB,IAAApB,IAElD,IAAAgC,GACAC,KACAlB,UAEAnB,aAEA,YACA,SACA,cACA,eACA,WACA,mBACA,gBACA,iBACA,iBACA,WACA,aACA,UACA,WACA,WACA,UACA,qBACA,eACA,iBACA,eACAsC,QAAA,SAAAnE,GAA+B,OAAAiE,EAAApC,QAAA7B,GAAA6B,EAAA7B,IAAA,eAC/B,IAAA8B,YAAAsC,SAAA1C,EAAAuC,GACAjF,QAAA2C,MAAA,EAAAmB,IAqFA,IADA,IAAAH,EAAA,IAAA0B,MAAA,KACA5E,EAAA,EAAeA,EAAA,IACfkD,EAAAlD,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,EAAAA,EAAA,OAAAA","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"asparse\"] = factory();\n\telse\n\t\troot[\"asparse\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","\"use strict\";\r\n/** Common constants shared between AssemblyScript and TypeScript. */\r\nexports.__esModule = true;\r\n/** WebAssembly types. */\r\nvar Type;\r\n(function (Type) {\r\n Type[Type[\"i32\"] = 127] = \"i32\";\r\n Type[Type[\"i64\"] = 126] = \"i64\";\r\n Type[Type[\"f32\"] = 125] = \"f32\";\r\n Type[Type[\"f64\"] = 124] = \"f64\";\r\n Type[Type[\"anyfunc\"] = 112] = \"anyfunc\";\r\n Type[Type[\"func\"] = 96] = \"func\";\r\n Type[Type[\"none\"] = 64] = \"none\";\r\n})(Type = exports.Type || (exports.Type = {}));\r\n/** WebAssembly section ids. */\r\nvar SectionId;\r\n(function (SectionId) {\r\n SectionId[SectionId[\"Custom\"] = 0] = \"Custom\";\r\n SectionId[SectionId[\"Type\"] = 1] = \"Type\";\r\n SectionId[SectionId[\"Import\"] = 2] = \"Import\";\r\n SectionId[SectionId[\"Function\"] = 3] = \"Function\";\r\n SectionId[SectionId[\"Table\"] = 4] = \"Table\";\r\n SectionId[SectionId[\"Memory\"] = 5] = \"Memory\";\r\n SectionId[SectionId[\"Global\"] = 6] = \"Global\";\r\n SectionId[SectionId[\"Export\"] = 7] = \"Export\";\r\n SectionId[SectionId[\"Start\"] = 8] = \"Start\";\r\n SectionId[SectionId[\"Element\"] = 9] = \"Element\";\r\n SectionId[SectionId[\"Code\"] = 10] = \"Code\";\r\n SectionId[SectionId[\"Data\"] = 11] = \"Data\";\r\n})(SectionId = exports.SectionId || (exports.SectionId = {}));\r\n/** WebAssembly external kinds. */\r\nvar ExternalKind;\r\n(function (ExternalKind) {\r\n ExternalKind[ExternalKind[\"Function\"] = 0] = \"Function\";\r\n ExternalKind[ExternalKind[\"Table\"] = 1] = \"Table\";\r\n ExternalKind[ExternalKind[\"Memory\"] = 2] = \"Memory\";\r\n ExternalKind[ExternalKind[\"Global\"] = 3] = \"Global\";\r\n})(ExternalKind = exports.ExternalKind || (exports.ExternalKind = {}));\r\n/** Name section types. */\r\nvar NameType;\r\n(function (NameType) {\r\n NameType[NameType[\"Module\"] = 0] = \"Module\";\r\n NameType[NameType[\"Function\"] = 1] = \"Function\";\r\n NameType[NameType[\"Local\"] = 2] = \"Local\";\r\n})(NameType = exports.NameType || (exports.NameType = {}));\r\n/** Maximum number of memory pages. */\r\nexports.MAX_PAGES = 0xffff;\r\n/** Maximum number of table elements. */\r\nexports.MAX_ELEMS = 0xffffffff;\r\n/** WebAssembly opcodes. */\r\nvar Opcode;\r\n(function (Opcode) {\r\n // unreachable = 0x00,\r\n // nop = 0x01,\r\n // block = 0x02,\r\n // loop = 0x03,\r\n // if_ = 0x04,\r\n // else_ = 0x05,\r\n Opcode[Opcode[\"end\"] = 11] = \"end\";\r\n // br = 0x0c,\r\n // br_if = 0x0d,\r\n // br_table = 0x0e,\r\n // return_ = 0x0f,\r\n // call = 0x10,\r\n // call_indirect = 0x11,\r\n // drop = 0x1a,\r\n // select = 0x1b,\r\n // get_local = 0x20,\r\n // set_local = 0x21,\r\n // tee_local = 0x22,\r\n Opcode[Opcode[\"get_global\"] = 35] = \"get_global\";\r\n // set_global = 0x24,\r\n // i32_load = 0x28,\r\n // i64_load = 0x29,\r\n // f32_load = 0x2a,\r\n // f64_load = 0x2b,\r\n // i32_load8_s = 0x2c,\r\n // i32_load8_u = 0x2d,\r\n // i32_load16_s = 0x2e,\r\n // i32_load16_u = 0x2f,\r\n // i64_load8_s = 0x30,\r\n // i64_load8_u = 0x31,\r\n // i64_load16_s = 0x32,\r\n // i64_load16_u = 0x33,\r\n // i64_load32_s = 0x34,\r\n // i64_load32_u = 0x35,\r\n // i32_store = 0x36,\r\n // i64_store = 0x37,\r\n // f32_store = 0x38,\r\n // f64_store = 0x39,\r\n // i32_store8 = 0x3a,\r\n // i32_store16 = 0x3b,\r\n // i64_store8 = 0x3c,\r\n // i64_store16 = 0x3d,\r\n // i64_store32 = 0x3e,\r\n // current_memory = 0x3f,\r\n // grow_memory = 0x40,\r\n Opcode[Opcode[\"i32_const\"] = 65] = \"i32_const\";\r\n Opcode[Opcode[\"i64_const\"] = 66] = \"i64_const\";\r\n Opcode[Opcode[\"f32_const\"] = 67] = \"f32_const\";\r\n Opcode[Opcode[\"f64_const\"] = 68] = \"f64_const\";\r\n // i32_eqz = 0x45,\r\n // i32_eq = 0x46,\r\n // i32_ne = 0x47,\r\n // i32_lt_s = 0x48,\r\n // i32_lt_u = 0x49,\r\n // i32_gt_s = 0x4a,\r\n // i32_gt_u = 0x4b,\r\n // i32_le_s = 0x4c,\r\n // i32_le_u = 0x4d,\r\n // i32_ge_s = 0x4e,\r\n // i32_ge_u = 0x4f,\r\n // i64_eqz = 0x50,\r\n // i64_eq = 0x51,\r\n // i64_ne = 0x52,\r\n // i64_lt_s = 0x53,\r\n // i64_lt_u = 0x54,\r\n // i64_gt_s = 0x55,\r\n // i64_gt_u = 0x56,\r\n // i64_le_s = 0x57,\r\n // i64_le_u = 0x58,\r\n // i64_ge_s = 0x59,\r\n // i64_ge_u = 0x5a,\r\n // f32_eq = 0x5b,\r\n // f32_ne = 0x5c,\r\n // f32_lt = 0x5d,\r\n // f32_gt = 0x5e,\r\n // f32_le = 0x5f,\r\n // f32_ge = 0x60,\r\n // f64_eq = 0x61,\r\n // f64_ne = 0x62,\r\n // f64_lt = 0x63,\r\n // f64_gt = 0x64,\r\n // f64_le = 0x65,\r\n // f64_ge = 0x66,\r\n // i32_clz = 0x67,\r\n // i32_ctz = 0x68,\r\n // i32_popcnt = 0x69,\r\n // i32_add = 0x6a,\r\n // i32_sub = 0x6b,\r\n // i32_mul = 0x6c,\r\n // i32_div_s = 0x6d,\r\n // i32_div_u = 0x6e,\r\n // i32_rem_s = 0x6f,\r\n // i32_rem_u = 0x70,\r\n // i32_and = 0x71,\r\n // i32_or = 0x72,\r\n // i32_xor = 0x73,\r\n // i32_shl = 0x74,\r\n // i32_shr_s = 0x75,\r\n // i32_shr_u = 0x76,\r\n // i32_rotl = 0x77,\r\n // i32_rotr = 0x78,\r\n // i64_clz = 0x79,\r\n // i64_ctz = 0x7a,\r\n // i64_popcnt = 0x7b,\r\n // i64_add = 0x7c,\r\n // i64_sub = 0x7d,\r\n // i64_mul = 0x7e,\r\n // i64_div_s = 0x7f,\r\n // i64_div_u = 0x80,\r\n // i64_rem_s = 0x81,\r\n // i64_rem_u = 0x82,\r\n // i64_and = 0x83,\r\n // i64_or = 0x84,\r\n // i64_xor = 0x85,\r\n // i64_shl = 0x86,\r\n // i64_shr_s = 0x87,\r\n // i64_shr_u = 0x88,\r\n // i64_rotl = 0x89,\r\n // i64_rotr = 0x8a,\r\n // f32_abs = 0x8b,\r\n // f32_neg = 0x8c,\r\n // f32_ceil = 0x8d,\r\n // f32_floor = 0x8e,\r\n // f32_trunc = 0x8f,\r\n // f32_nearest = 0x90,\r\n // f32_sqrt = 0x91,\r\n // f32_add = 0x92,\r\n // f32_sub = 0x93,\r\n // f32_mul = 0x94,\r\n // f32_div = 0x95,\r\n // f32_min = 0x96,\r\n // f32_max = 0x97,\r\n // f32_copysign = 0x98,\r\n // f64_abs = 0x99,\r\n // f64_neg = 0x9a,\r\n // f64_ceil = 0x9b,\r\n // f64_floor = 0x9c,\r\n // f64_trunc = 0x9d,\r\n // f64_nearest = 0x9e,\r\n // f64_sqrt = 0x9f,\r\n // f64_add = 0xa0,\r\n // f64_sub = 0xa1,\r\n // f64_mul = 0xa2,\r\n // f64_div = 0xa3,\r\n // f64_min = 0xa4,\r\n // f64_max = 0xa5,\r\n // f64_copysign = 0xa6,\r\n // i32_wrap_i64 = 0xa7,\r\n // i32_trunc_s_f32 = 0xa8,\r\n // i32_trunc_u_f32 = 0xa9,\r\n // i32_trunc_s_f64 = 0xaa,\r\n // i32_trunc_u_f64 = 0xab,\r\n // i64_extend_s_i32 = 0xac,\r\n // i64_extend_u_i32 = 0xad,\r\n // i64_trunc_s_f32 = 0xae,\r\n // i64_trunc_u_f32 = 0xaf,\r\n // i64_trunc_s_f64 = 0xb0,\r\n // i64_trunc_u_f64 = 0xb1,\r\n // f32_convert_s_i32 = 0xb2,\r\n // f32_convert_u_i32 = 0xb3,\r\n // f32_convert_s_i64 = 0xb4,\r\n // f32_convert_u_i64 = 0xb5,\r\n // f32_demote_f64 = 0xb6,\r\n // f64_convert_s_i32 = 0xb7,\r\n // f64_convert_u_i32 = 0xb8,\r\n // f64_convert_s_i64 = 0xb9,\r\n // f64_convert_u_i64 = 0xba,\r\n // f64_promote_f32 = 0xbb,\r\n // i32_reinterpret_f32 = 0xbc,\r\n // i64_reinterpret_f64 = 0xbd,\r\n // f32_reinterpret_i32 = 0xbe,\r\n // f64_reinterpret_i64 = 0xbf\r\n})(Opcode = exports.Opcode || (exports.Opcode = {}));\r\n","\"use strict\";\r\nexports.__esModule = true;\r\nvar common_1 = require(\"./common\");\r\nexports.Type = common_1.Type;\r\nexports.SectionId = common_1.SectionId;\r\nexports.ExternalKind = common_1.ExternalKind;\r\n/** Cached compiled parser. */\r\nvar compiled = null;\r\nif (typeof WASM_DATA !== \"string\")\r\n WASM_DATA = require(\"fs\").readFileSync(__dirname + \"/../build/index.wasm\", \"base64\");\r\n/** Parses the contents of a WebAssembly binary according to the specified options. */\r\nfunction parse(binary, options) {\r\n if (!options)\r\n options = {};\r\n // compile the parser if not yet compiled\r\n if (!compiled)\r\n compiled = new WebAssembly.Module(base64_decode(WASM_DATA));\r\n // use the binary as the parser's memory\r\n var nBytes = binary.length;\r\n var nPages = ((nBytes + 0xffff) & ~0xffff) >> 16;\r\n var memory = new WebAssembly.Memory({ initial: nPages });\r\n var buffer = new Uint8Array(memory.buffer);\r\n buffer.set(binary);\r\n // provide a way to read strings from memory\r\n parse.readString = function (offset, length) { return utf8_read(buffer, offset, offset + length); };\r\n // instantiate the parser and return its exports\r\n var imports = {\r\n env: {\r\n memory: memory\r\n },\r\n options: {}\r\n };\r\n [\"onSection\",\r\n \"onType\",\r\n \"onTypeParam\",\r\n \"onTypeReturn\",\r\n \"onImport\",\r\n \"onFunctionImport\",\r\n \"onTableImport\",\r\n \"onMemoryImport\",\r\n \"onGlobalImport\",\r\n \"onMemory\",\r\n \"onFunction\",\r\n \"onTable\",\r\n \"onGlobal\",\r\n \"onExport\",\r\n \"onStart\",\r\n \"onSourceMappingURL\",\r\n \"onModuleName\",\r\n \"onFunctionName\",\r\n \"onLocalName\"\r\n ].forEach(function (name) { return imports.options[name] = options[name] || function () { }; });\r\n var instance = new WebAssembly.Instance(compiled, imports);\r\n instance.exports.parse(0, nBytes);\r\n}\r\nexports.parse = parse;\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/utf8\r\nfunction utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null, chunk = [], i = 0, // char offset\r\n t = 0; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128) {\r\n chunk[i++] = t;\r\n }\r\n else if (t > 191 && t < 224) {\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n }\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n }\r\n else {\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n}\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/base64\r\nfunction base64_decode(string) {\r\n var length = string.length;\r\n if (length) {\r\n var n = 0, p = length;\r\n while (--p % 4 > 1 && string.charCodeAt(p) === 61)\r\n ++n;\r\n length = Math.ceil(length * 3) / 4 - n;\r\n }\r\n var buffer = new Uint8Array(length);\r\n var j = 0, o = 0, t = 0;\r\n for (var i = 0, k = string.length; i < k;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error();\r\n switch (j) {\r\n case 0: {\r\n t = c;\r\n j = 1;\r\n break;\r\n }\r\n case 1: {\r\n buffer[o++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n }\r\n case 2: {\r\n buffer[o++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n }\r\n case 3: {\r\n buffer[o++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n }\r\n if (j === 1)\r\n throw Error();\r\n return buffer;\r\n}\r\nvar s64 = new Array(123);\r\nfor (var i = 0; i < 64;)\r\n s64[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://asparse/webpack/universalModuleDefinition","webpack://asparse/webpack/bootstrap","webpack://asparse/./src/common.ts","webpack://asparse/./src/index.ts"],"names":["root","factory","exports","module","define","amd","self","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","configurable","enumerable","get","r","value","n","__esModule","object","property","prototype","hasOwnProperty","p","s","Type","SectionId","ExternalKind","NameType","MAX_PAGES","MAX_ELEMS","Opcode","common_1","compiled","parse","binary","options","WebAssembly","Module","string","length","charCodeAt","Math","ceil","buffer","Uint8Array","j","t","k","undefined","s64","Error","base64_decode","nBytes","nPages","memory","Memory","initial","set","readString","offset","start","end","parts","chunk","push","String","fromCharCode","apply","slice","join","utf8_read","imports","env","forEach","Instance","Array"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,UAAAH,GACA,iBAAAC,QACAA,QAAA,QAAAD,IAEAD,EAAA,QAAAC,IARA,CASC,oBAAAK,UAAAC,KAAA,WACD,mBCTA,IAAAC,KAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAR,QAGA,IAAAC,EAAAK,EAAAE,IACAC,EAAAD,EACAE,GAAA,EACAV,YAUA,OANAW,EAAAH,GAAAI,KAAAX,EAAAD,QAAAC,IAAAD,QAAAO,GAGAN,EAAAS,GAAA,EAGAT,EAAAD,QA2CA,OAtCAO,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAf,EAAAgB,EAAAC,GACAV,EAAAW,EAAAlB,EAAAgB,IACAG,OAAAC,eAAApB,EAAAgB,GACAK,cAAA,EACAC,YAAA,EACAC,IAAAN,KAMAV,EAAAiB,EAAA,SAAAxB,GACAmB,OAAAC,eAAApB,EAAA,cAAiDyB,OAAA,KAIjDlB,EAAAmB,EAAA,SAAAzB,GACA,IAAAgB,EAAAhB,KAAA0B,WACA,WAA2B,OAAA1B,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAM,EAAAQ,EAAAE,EAAA,IAAAA,GACAA,GAIAV,EAAAW,EAAA,SAAAU,EAAAC,GAAsD,OAAAV,OAAAW,UAAAC,eAAAnB,KAAAgB,EAAAC,IAGtDtB,EAAAyB,EAAA,GAIAzB,IAAA0B,EAAA,kCCjEAjC,EAAA2B,YAAA,EAGA,SAAAO,GACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,eACAA,IAAA,uBACAA,IAAA,gBACAA,IAAA,gBAPA,CAQClC,EAAAkC,OAAAlC,EAAAkC,UAGD,SAAAC,GACAA,IAAA,mBACAA,IAAA,eACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,mBACAA,IAAA,iBACAA,IAAA,qBACAA,IAAA,gBACAA,IAAA,gBAZA,CAaCnC,EAAAmC,YAAAnC,EAAAmC,eAGD,SAAAC,GACAA,IAAA,uBACAA,IAAA,iBACAA,IAAA,mBACAA,IAAA,mBAJA,CAKCpC,EAAAoC,eAAApC,EAAAoC,kBAGD,SAAAC,GACAA,IAAA,mBACAA,IAAA,uBACAA,IAAA,iBAHA,CAICrC,EAAAqC,WAAArC,EAAAqC,cAEDrC,EAAAsC,UAAA,MAEAtC,EAAAuC,UAAA,WAGA,SAAAC,GAOAA,IAAA,cAYAA,IAAA,4BA2BAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BACAA,IAAA,0BAjDA,CA6KCxC,EAAAwC,SAAAxC,EAAAwC,0CC/NDxC,EAAA2B,YAAA,EACA,IAAAc,EAAAlC,EAAA,GACAP,EAAAkC,KAAAO,EAAAP,KACAlC,EAAAmC,UAAAM,EAAAN,UACAnC,EAAAoC,aAAAK,EAAAL,aAEA,IAAAM,EAAA,KAgDA1C,EAAA2C,MA5CA,SAAAA,EAAAC,EAAAC,GACAA,IACAA,MAEAH,IACAA,EAAA,IAAAI,YAAAC,OA4EA,SAAAC,GACA,IAAAC,EAAAD,EAAAC,OACA,GAAAA,EAAA,CAEA,IADA,IAAAvB,EAAA,EAAAM,EAAAiB,IACAjB,EAAA,UAAAgB,EAAAE,WAAAlB,MACAN,EACAuB,EAAAE,KAAAC,KAAA,EAAAH,GAAA,EAAAvB,EAIA,IAFA,IAAA2B,EAAA,IAAAC,WAAAL,GACAM,EAAA,EAAArC,EAAA,EAAAsC,EAAA,EACA/C,EAAA,EAAAgD,EAAAT,EAAAC,OAAsCxC,EAAAgD,GAAO,CAC7C,IAAA3C,EAAAkC,EAAAE,WAAAzC,KACA,QAAAK,GAAAyC,EAAA,EACA,MACA,QAAAG,KAAA5C,EAAA6C,EAAA7C,IACA,MAAA8C,QACA,OAAAL,GACA,OACAC,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,KAAAsC,GAAA,MAAA1C,IAAA,EACA0C,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,MAAA,GAAAsC,IAAA,MAAA1C,IAAA,EACA0C,EAAA1C,EACAyC,EAAA,EACA,MAEA,OACAF,EAAAnC,MAAA,EAAAsC,IAAA,EAAA1C,EACAyC,EAAA,GAKA,OAAAA,EACA,MAAAK,QACA,OAAAP,EAvHAQ,CAAA,04GAEA,IAAAC,EAAAlB,EAAAK,OACAc,GAAAD,EAAA,kBACAE,EAAA,IAAAlB,YAAAmB,QAAyCC,QAAAH,IACzCV,EAAA,IAAAC,WAAAU,EAAAX,QACAA,EAAAc,IAAAvB,GAEAD,EAAAyB,WAAA,SAAAC,EAAApB,GAAkD,OAiClD,SAAAI,EAAAiB,EAAAC,GAEA,GADAA,EAAAD,EACA,EACA,SAGA,IAFA,IAAAE,EAAA,KAAAC,KAAAhE,EAAA,EACA+C,EAAA,EACAc,EAAAC,IACAf,EAAAH,EAAAiB,MACA,IACAG,EAAAhE,KAAA+C,EAEAA,EAAA,KAAAA,EAAA,IACAiB,EAAAhE,MAAA,GAAA+C,IAAA,KAAAH,EAAAiB,KAEAd,EAAA,KAAAA,EAAA,KACAA,IAAA,EAAAA,IAAA,OAAAH,EAAAiB,OAAA,OAAAjB,EAAAiB,OAAA,KAAAjB,EAAAiB,MAAA,MACAG,EAAAhE,KAAA,OAAA+C,GAAA,IACAiB,EAAAhE,KAAA,YAAA+C,IAGAiB,EAAAhE,MAAA,GAAA+C,IAAA,OAAAH,EAAAiB,OAAA,KAAAjB,EAAAiB,KAEA7D,EAAA,QACA+D,WAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,IACAhE,EAAA,GAGA,OAAA+D,GACA/D,GACA+D,EAAAE,KAAAC,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAArE,KACA+D,EAAAO,KAAA,KAEAJ,OAAAC,aAAAC,MAAAF,OAAAF,EAAAK,MAAA,EAAArE,IAjEkDuE,CAAA3B,EAAAgB,IAAApB,IAElD,IAAAgC,GACAC,KACAlB,UAEAnB,aAEA,YACA,SACA,cACA,eACA,WACA,mBACA,gBACA,iBACA,iBACA,WACA,aACA,UACA,WACA,WACA,UACA,qBACA,eACA,iBACA,eACAsC,QAAA,SAAAnE,GAA+B,OAAAiE,EAAApC,QAAA7B,GAAA6B,EAAA7B,IAAA,eAC/B,IAAA8B,YAAAsC,SAAA1C,EAAAuC,GACAjF,QAAA2C,MAAA,EAAAmB,IAqFA,IADA,IAAAH,EAAA,IAAA0B,MAAA,KACA5E,EAAA,EAAeA,EAAA,IACfkD,EAAAlD,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,GAAAA,EAAA,EAAAA,EAAA,OAAAA","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"asparse\"] = factory();\n\telse\n\t\troot[\"asparse\"] = factory();\n})(typeof self !== 'undefined' ? self : this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","\"use strict\";\r\n/** Common constants shared between AssemblyScript and TypeScript. */\r\nexports.__esModule = true;\r\n/** WebAssembly types. */\r\nvar Type;\r\n(function (Type) {\r\n Type[Type[\"i32\"] = 127] = \"i32\";\r\n Type[Type[\"i64\"] = 126] = \"i64\";\r\n Type[Type[\"f32\"] = 125] = \"f32\";\r\n Type[Type[\"f64\"] = 124] = \"f64\";\r\n Type[Type[\"anyfunc\"] = 112] = \"anyfunc\";\r\n Type[Type[\"func\"] = 96] = \"func\";\r\n Type[Type[\"none\"] = 64] = \"none\";\r\n})(Type = exports.Type || (exports.Type = {}));\r\n/** WebAssembly section ids. */\r\nvar SectionId;\r\n(function (SectionId) {\r\n SectionId[SectionId[\"Custom\"] = 0] = \"Custom\";\r\n SectionId[SectionId[\"Type\"] = 1] = \"Type\";\r\n SectionId[SectionId[\"Import\"] = 2] = \"Import\";\r\n SectionId[SectionId[\"Function\"] = 3] = \"Function\";\r\n SectionId[SectionId[\"Table\"] = 4] = \"Table\";\r\n SectionId[SectionId[\"Memory\"] = 5] = \"Memory\";\r\n SectionId[SectionId[\"Global\"] = 6] = \"Global\";\r\n SectionId[SectionId[\"Export\"] = 7] = \"Export\";\r\n SectionId[SectionId[\"Start\"] = 8] = \"Start\";\r\n SectionId[SectionId[\"Element\"] = 9] = \"Element\";\r\n SectionId[SectionId[\"Code\"] = 10] = \"Code\";\r\n SectionId[SectionId[\"Data\"] = 11] = \"Data\";\r\n})(SectionId = exports.SectionId || (exports.SectionId = {}));\r\n/** WebAssembly external kinds. */\r\nvar ExternalKind;\r\n(function (ExternalKind) {\r\n ExternalKind[ExternalKind[\"Function\"] = 0] = \"Function\";\r\n ExternalKind[ExternalKind[\"Table\"] = 1] = \"Table\";\r\n ExternalKind[ExternalKind[\"Memory\"] = 2] = \"Memory\";\r\n ExternalKind[ExternalKind[\"Global\"] = 3] = \"Global\";\r\n})(ExternalKind = exports.ExternalKind || (exports.ExternalKind = {}));\r\n/** Name section types. */\r\nvar NameType;\r\n(function (NameType) {\r\n NameType[NameType[\"Module\"] = 0] = \"Module\";\r\n NameType[NameType[\"Function\"] = 1] = \"Function\";\r\n NameType[NameType[\"Local\"] = 2] = \"Local\";\r\n})(NameType = exports.NameType || (exports.NameType = {}));\r\n/** Maximum number of memory pages. */\r\nexports.MAX_PAGES = 0xffff;\r\n/** Maximum number of table elements. */\r\nexports.MAX_ELEMS = 0xffffffff;\r\n/** WebAssembly opcodes. */\r\nvar Opcode;\r\n(function (Opcode) {\r\n // unreachable = 0x00,\r\n // nop = 0x01,\r\n // block = 0x02,\r\n // loop = 0x03,\r\n // if_ = 0x04,\r\n // else_ = 0x05,\r\n Opcode[Opcode[\"end\"] = 11] = \"end\";\r\n // br = 0x0c,\r\n // br_if = 0x0d,\r\n // br_table = 0x0e,\r\n // return_ = 0x0f,\r\n // call = 0x10,\r\n // call_indirect = 0x11,\r\n // drop = 0x1a,\r\n // select = 0x1b,\r\n // get_local = 0x20,\r\n // set_local = 0x21,\r\n // tee_local = 0x22,\r\n Opcode[Opcode[\"get_global\"] = 35] = \"get_global\";\r\n // set_global = 0x24,\r\n // i32_load = 0x28,\r\n // i64_load = 0x29,\r\n // f32_load = 0x2a,\r\n // f64_load = 0x2b,\r\n // i32_load8_s = 0x2c,\r\n // i32_load8_u = 0x2d,\r\n // i32_load16_s = 0x2e,\r\n // i32_load16_u = 0x2f,\r\n // i64_load8_s = 0x30,\r\n // i64_load8_u = 0x31,\r\n // i64_load16_s = 0x32,\r\n // i64_load16_u = 0x33,\r\n // i64_load32_s = 0x34,\r\n // i64_load32_u = 0x35,\r\n // i32_store = 0x36,\r\n // i64_store = 0x37,\r\n // f32_store = 0x38,\r\n // f64_store = 0x39,\r\n // i32_store8 = 0x3a,\r\n // i32_store16 = 0x3b,\r\n // i64_store8 = 0x3c,\r\n // i64_store16 = 0x3d,\r\n // i64_store32 = 0x3e,\r\n // current_memory = 0x3f,\r\n // grow_memory = 0x40,\r\n Opcode[Opcode[\"i32_const\"] = 65] = \"i32_const\";\r\n Opcode[Opcode[\"i64_const\"] = 66] = \"i64_const\";\r\n Opcode[Opcode[\"f32_const\"] = 67] = \"f32_const\";\r\n Opcode[Opcode[\"f64_const\"] = 68] = \"f64_const\";\r\n // i32_eqz = 0x45,\r\n // i32_eq = 0x46,\r\n // i32_ne = 0x47,\r\n // i32_lt_s = 0x48,\r\n // i32_lt_u = 0x49,\r\n // i32_gt_s = 0x4a,\r\n // i32_gt_u = 0x4b,\r\n // i32_le_s = 0x4c,\r\n // i32_le_u = 0x4d,\r\n // i32_ge_s = 0x4e,\r\n // i32_ge_u = 0x4f,\r\n // i64_eqz = 0x50,\r\n // i64_eq = 0x51,\r\n // i64_ne = 0x52,\r\n // i64_lt_s = 0x53,\r\n // i64_lt_u = 0x54,\r\n // i64_gt_s = 0x55,\r\n // i64_gt_u = 0x56,\r\n // i64_le_s = 0x57,\r\n // i64_le_u = 0x58,\r\n // i64_ge_s = 0x59,\r\n // i64_ge_u = 0x5a,\r\n // f32_eq = 0x5b,\r\n // f32_ne = 0x5c,\r\n // f32_lt = 0x5d,\r\n // f32_gt = 0x5e,\r\n // f32_le = 0x5f,\r\n // f32_ge = 0x60,\r\n // f64_eq = 0x61,\r\n // f64_ne = 0x62,\r\n // f64_lt = 0x63,\r\n // f64_gt = 0x64,\r\n // f64_le = 0x65,\r\n // f64_ge = 0x66,\r\n // i32_clz = 0x67,\r\n // i32_ctz = 0x68,\r\n // i32_popcnt = 0x69,\r\n // i32_add = 0x6a,\r\n // i32_sub = 0x6b,\r\n // i32_mul = 0x6c,\r\n // i32_div_s = 0x6d,\r\n // i32_div_u = 0x6e,\r\n // i32_rem_s = 0x6f,\r\n // i32_rem_u = 0x70,\r\n // i32_and = 0x71,\r\n // i32_or = 0x72,\r\n // i32_xor = 0x73,\r\n // i32_shl = 0x74,\r\n // i32_shr_s = 0x75,\r\n // i32_shr_u = 0x76,\r\n // i32_rotl = 0x77,\r\n // i32_rotr = 0x78,\r\n // i64_clz = 0x79,\r\n // i64_ctz = 0x7a,\r\n // i64_popcnt = 0x7b,\r\n // i64_add = 0x7c,\r\n // i64_sub = 0x7d,\r\n // i64_mul = 0x7e,\r\n // i64_div_s = 0x7f,\r\n // i64_div_u = 0x80,\r\n // i64_rem_s = 0x81,\r\n // i64_rem_u = 0x82,\r\n // i64_and = 0x83,\r\n // i64_or = 0x84,\r\n // i64_xor = 0x85,\r\n // i64_shl = 0x86,\r\n // i64_shr_s = 0x87,\r\n // i64_shr_u = 0x88,\r\n // i64_rotl = 0x89,\r\n // i64_rotr = 0x8a,\r\n // f32_abs = 0x8b,\r\n // f32_neg = 0x8c,\r\n // f32_ceil = 0x8d,\r\n // f32_floor = 0x8e,\r\n // f32_trunc = 0x8f,\r\n // f32_nearest = 0x90,\r\n // f32_sqrt = 0x91,\r\n // f32_add = 0x92,\r\n // f32_sub = 0x93,\r\n // f32_mul = 0x94,\r\n // f32_div = 0x95,\r\n // f32_min = 0x96,\r\n // f32_max = 0x97,\r\n // f32_copysign = 0x98,\r\n // f64_abs = 0x99,\r\n // f64_neg = 0x9a,\r\n // f64_ceil = 0x9b,\r\n // f64_floor = 0x9c,\r\n // f64_trunc = 0x9d,\r\n // f64_nearest = 0x9e,\r\n // f64_sqrt = 0x9f,\r\n // f64_add = 0xa0,\r\n // f64_sub = 0xa1,\r\n // f64_mul = 0xa2,\r\n // f64_div = 0xa3,\r\n // f64_min = 0xa4,\r\n // f64_max = 0xa5,\r\n // f64_copysign = 0xa6,\r\n // i32_wrap_i64 = 0xa7,\r\n // i32_trunc_s_f32 = 0xa8,\r\n // i32_trunc_u_f32 = 0xa9,\r\n // i32_trunc_s_f64 = 0xaa,\r\n // i32_trunc_u_f64 = 0xab,\r\n // i64_extend_s_i32 = 0xac,\r\n // i64_extend_u_i32 = 0xad,\r\n // i64_trunc_s_f32 = 0xae,\r\n // i64_trunc_u_f32 = 0xaf,\r\n // i64_trunc_s_f64 = 0xb0,\r\n // i64_trunc_u_f64 = 0xb1,\r\n // f32_convert_s_i32 = 0xb2,\r\n // f32_convert_u_i32 = 0xb3,\r\n // f32_convert_s_i64 = 0xb4,\r\n // f32_convert_u_i64 = 0xb5,\r\n // f32_demote_f64 = 0xb6,\r\n // f64_convert_s_i32 = 0xb7,\r\n // f64_convert_u_i32 = 0xb8,\r\n // f64_convert_s_i64 = 0xb9,\r\n // f64_convert_u_i64 = 0xba,\r\n // f64_promote_f32 = 0xbb,\r\n // i32_reinterpret_f32 = 0xbc,\r\n // i64_reinterpret_f64 = 0xbd,\r\n // f32_reinterpret_i32 = 0xbe,\r\n // f64_reinterpret_i64 = 0xbf\r\n})(Opcode = exports.Opcode || (exports.Opcode = {}));\r\n","\"use strict\";\r\nexports.__esModule = true;\r\nvar common_1 = require(\"./common\");\r\nexports.Type = common_1.Type;\r\nexports.SectionId = common_1.SectionId;\r\nexports.ExternalKind = common_1.ExternalKind;\r\n/** Cached compiled parser. */\r\nvar compiled = null;\r\nif (typeof WASM_DATA !== \"string\")\r\n WASM_DATA = require(\"fs\").readFileSync(__dirname + \"/../build/index.wasm\", \"base64\");\r\n/** Parses the contents of a WebAssembly binary according to the specified options. */\r\nfunction parse(binary, options) {\r\n if (!options)\r\n options = {};\r\n // compile the parser if not yet compiled\r\n if (!compiled)\r\n compiled = new WebAssembly.Module(base64_decode(WASM_DATA));\r\n // use the binary as the parser's memory\r\n var nBytes = binary.length;\r\n var nPages = ((nBytes + 0xffff) & ~0xffff) >> 16;\r\n var memory = new WebAssembly.Memory({ initial: nPages });\r\n var buffer = new Uint8Array(memory.buffer);\r\n buffer.set(binary);\r\n // provide a way to read strings from memory\r\n parse.readString = function (offset, length) { return utf8_read(buffer, offset, offset + length); };\r\n // instantiate the parser and return its exports\r\n var imports = {\r\n env: {\r\n memory: memory\r\n },\r\n options: {}\r\n };\r\n [\"onSection\",\r\n \"onType\",\r\n \"onTypeParam\",\r\n \"onTypeReturn\",\r\n \"onImport\",\r\n \"onFunctionImport\",\r\n \"onTableImport\",\r\n \"onMemoryImport\",\r\n \"onGlobalImport\",\r\n \"onMemory\",\r\n \"onFunction\",\r\n \"onTable\",\r\n \"onGlobal\",\r\n \"onExport\",\r\n \"onStart\",\r\n \"onSourceMappingURL\",\r\n \"onModuleName\",\r\n \"onFunctionName\",\r\n \"onLocalName\"\r\n ].forEach(function (name) { return imports.options[name] = options[name] || function () { }; });\r\n var instance = new WebAssembly.Instance(compiled, imports);\r\n instance.exports.parse(0, nBytes);\r\n}\r\nexports.parse = parse;\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/utf8\r\nfunction utf8_read(buffer, start, end) {\r\n var len = end - start;\r\n if (len < 1)\r\n return \"\";\r\n var parts = null, chunk = [], i = 0, // char offset\r\n t = 0; // temporary\r\n while (start < end) {\r\n t = buffer[start++];\r\n if (t < 128) {\r\n chunk[i++] = t;\r\n }\r\n else if (t > 191 && t < 224) {\r\n chunk[i++] = (t & 31) << 6 | buffer[start++] & 63;\r\n }\r\n else if (t > 239 && t < 365) {\r\n t = ((t & 7) << 18 | (buffer[start++] & 63) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63) - 0x10000;\r\n chunk[i++] = 0xD800 + (t >> 10);\r\n chunk[i++] = 0xDC00 + (t & 1023);\r\n }\r\n else {\r\n chunk[i++] = (t & 15) << 12 | (buffer[start++] & 63) << 6 | buffer[start++] & 63;\r\n }\r\n if (i > 8191) {\r\n (parts || (parts = [])).push(String.fromCharCode.apply(String, chunk));\r\n i = 0;\r\n }\r\n }\r\n if (parts) {\r\n if (i)\r\n parts.push(String.fromCharCode.apply(String, chunk.slice(0, i)));\r\n return parts.join(\"\");\r\n }\r\n return String.fromCharCode.apply(String, chunk.slice(0, i));\r\n}\r\n// see: https://github.com/dcodeIO/protobuf.js/tree/master/lib/base64\r\nfunction base64_decode(string) {\r\n var length = string.length;\r\n if (length) {\r\n var n = 0, p = length;\r\n while (--p % 4 > 1 && string.charCodeAt(p) === 61)\r\n ++n;\r\n length = Math.ceil(length * 3) / 4 - n;\r\n }\r\n var buffer = new Uint8Array(length);\r\n var j = 0, o = 0, t = 0;\r\n for (var i = 0, k = string.length; i < k;) {\r\n var c = string.charCodeAt(i++);\r\n if (c === 61 && j > 1)\r\n break;\r\n if ((c = s64[c]) === undefined)\r\n throw Error();\r\n switch (j) {\r\n case 0: {\r\n t = c;\r\n j = 1;\r\n break;\r\n }\r\n case 1: {\r\n buffer[o++] = t << 2 | (c & 48) >> 4;\r\n t = c;\r\n j = 2;\r\n break;\r\n }\r\n case 2: {\r\n buffer[o++] = (t & 15) << 4 | (c & 60) >> 2;\r\n t = c;\r\n j = 3;\r\n break;\r\n }\r\n case 3: {\r\n buffer[o++] = (t & 3) << 6 | c;\r\n j = 0;\r\n break;\r\n }\r\n }\r\n }\r\n if (j === 1)\r\n throw Error();\r\n return buffer;\r\n}\r\nvar s64 = new Array(123);\r\nfor (var i = 0; i < 64;)\r\n s64[i < 26 ? i + 65 : i < 52 ? i + 71 : i < 62 ? i - 4 : i - 59 | 43] = i++;\r\n"],"sourceRoot":""} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ed01cd91..f4e896da 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,23 +11,23 @@ }, "@types/events": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/@types/events/-/events-1.2.0.tgz", "integrity": "sha512-KEIlhXnIutzKwRbQkGWb/I4HFqBuUykAdHgDED6xqwXJfONCjF5VoE0cXEiurh3XauygxzeDzgtXUqvLkxFzzA==", "dev": true }, "@types/fs-extra": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.1.tgz", - "integrity": "sha512-h3wnflb+jMTipvbbZnClgA2BexrT4w0GcfoCz5qyxd0IRsbqhLSyesM6mqZTAnhbVmhyTm5tuxfRu9R+8l+lGw==", + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.0.4.tgz", + "integrity": "sha512-DsknoBvD8s+RFfSGjmERJ7ZOP1HI0UZRA3FSI+Zakhrc/Gy26YQsLI+m5V5DHxroHRJqCDLKJp7Hixn8zyaF7g==", "dev": true, "requires": { "@types/node": "*" } }, "@types/glob": { - "version": "5.0.35", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-5.0.35.tgz", - "integrity": "sha512-wc+VveszMLyMWFvXLkloixT4n0harUIVZjnpzztaZ0nKLuul7Z32iMt2fUFGAaZ4y1XWjFRMtCI5ewvyh4aIeg==", + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", + "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", "dev": true, "requires": { "@types/events": "*", @@ -36,27 +36,27 @@ } }, "@types/handlebars": { - "version": "4.0.36", - "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.0.36.tgz", - "integrity": "sha512-LjNiTX7TY7wtuC6y3QwC93hKMuqYhgV9A1uXBKNvZtVC8ZvyWAjZkJ5BvT0K7RKqORRYRLMrqCxpw5RgS+MdrQ==", + "version": "4.0.39", + "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.0.39.tgz", + "integrity": "sha512-vjaS7Q0dVqFp85QhyPSZqDKnTTCemcSHNHFvDdalO1s0Ifz5KuE64jQD5xoUkfdWwF4WpqdJEl7LsWH8rzhKJA==", "dev": true }, "@types/highlight.js": { - "version": "9.12.2", - "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.2.tgz", - "integrity": "sha512-y5x0XD/WXDaGSyiTaTcKS4FurULJtSiYbGTeQd0m2LYZGBcZZ/7fM6t5H/DzeUF+kv8y6UfmF6yJABQsHcp9VQ==", + "version": "9.12.3", + "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.3.tgz", + "integrity": "sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ==", "dev": true }, "@types/lodash": { - "version": "4.14.104", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.104.tgz", - "integrity": "sha512-ufQcVg4daO8xQ5kopxRHanqFdL4AI7ondQkV+2f+7mz3gvp0LkBx2zBRC6hfs3T87mzQFmf5Fck7Fi145Ul6NQ==", + "version": "4.14.117", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.117.tgz", + "integrity": "sha512-xyf2m6tRbz8qQKcxYZa7PA4SllYcay+eh25DN3jmNYY6gSTL7Htc/bttVdkqj2wfJGbeWlQiX8pIyJpKU+tubw==", "dev": true }, "@types/marked": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.3.0.tgz", - "integrity": "sha512-CSf9YWJdX1DkTNu9zcNtdCcn6hkRtB5ILjbhRId4ZOQqx30fXmdecuaXhugQL6eyrhuXtaHJ7PHI+Vm7k9ZJjg==", + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.4.2.tgz", + "integrity": "sha512-cDB930/7MbzaGF6U3IwSQp6XBru8xWajF5PV2YZZeV8DyiliTuld11afVztGI9+yJZ29il5E+NpGA6ooV/Cjkg==", "dev": true }, "@types/minimatch": { @@ -66,15 +66,15 @@ "dev": true }, "@types/node": { - "version": "10.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.9.4.tgz", - "integrity": "sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw==", + "version": "10.11.7", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.11.7.tgz", + "integrity": "sha512-yOxFfkN9xUFLyvWaeYj90mlqTJ41CsQzWKS3gXdOMOyPVacUsymejKxJ4/pMW7exouubuEeZLJawGgcNGYlTeg==", "dev": true }, "@types/shelljs": { - "version": "0.7.8", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.7.8.tgz", - "integrity": "sha512-M2giRw93PxKS7YjU6GZjtdV9HASdB7TWqizBXe4Ju7AqbKlWvTr0gNO92XH56D/gMxqD/jNHLNfC5hA34yGqrQ==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.0.tgz", + "integrity": "sha512-vs1hCC8RxLHRu2bwumNyYRNrU3o8BtZhLysH5A4I98iYmA2APl6R3uNQb5ihl+WiwH0xdC9LLO+vRrXLs/Kyxg==", "dev": true, "requires": { "@types/glob": "*", @@ -82,179 +82,174 @@ } }, "@webassemblyjs/ast": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.6.tgz", - "integrity": "sha512-8nkZS48EVsMUU0v6F1LCIOw4RYWLm2plMtbhFTjNgeXmsTNLuU3xTRtnljt9BFQB+iPbLRobkNrCWftWnNC7wQ==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.7.8.tgz", + "integrity": "sha512-dOrtdtEyB8sInpl75yLPNksY4sRl0j/+t6aHyB/YA+ab9hV3Fo7FmG12FHzP+2MvWVAJtDb+6eXR5EZbZJ+uVg==", "dev": true, "requires": { - "@webassemblyjs/helper-module-context": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/wast-parser": "1.7.6", - "mamacro": "^0.0.3" + "@webassemblyjs/helper-module-context": "1.7.8", + "@webassemblyjs/helper-wasm-bytecode": "1.7.8", + "@webassemblyjs/wast-parser": "1.7.8" } }, "@webassemblyjs/floating-point-hex-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.6.tgz", - "integrity": "sha512-VBOZvaOyBSkPZdIt5VBMg3vPWxouuM13dPXGWI1cBh3oFLNcFJ8s9YA7S9l4mPI7+Q950QqOmqj06oa83hNWBA==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.7.8.tgz", + "integrity": "sha512-kn2zNKGsbql5i56VAgRYkpG+VazqHhQQZQycT2uXAazrAEDs23gy+Odkh5VblybjnwX2/BITkDtNmSO76hdIvQ==", "dev": true }, "@webassemblyjs/helper-api-error": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.6.tgz", - "integrity": "sha512-SCzhcQWHXfrfMSKcj8zHg1/kL9kb3aa5TN4plc/EREOs5Xop0ci5bdVBApbk2yfVi8aL+Ly4Qpp3/TRAUInjrg==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.7.8.tgz", + "integrity": "sha512-xUwxDXsd1dUKArJEP5wWM5zxgCSwZApSOJyP1XO7M8rNUChUDblcLQ4FpzTpWG2YeylMwMl1MlP5Ztryiz1x4g==", "dev": true }, "@webassemblyjs/helper-buffer": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.6.tgz", - "integrity": "sha512-1/gW5NaGsEOZ02fjnFiU8/OEEXU1uVbv2um0pQ9YVL3IHSkyk6xOwokzyqqO1qDZQUAllb+V8irtClPWntbVqw==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.7.8.tgz", + "integrity": "sha512-WXiIMnuvuwlhWvVOm8xEXU9DnHaa3AgAU0ZPfvY8vO1cSsmYb2WbGbHnMLgs43vXnA7XAob9b56zuZaMkxpCBg==", "dev": true }, "@webassemblyjs/helper-code-frame": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.6.tgz", - "integrity": "sha512-+suMJOkSn9+vEvDvgyWyrJo5vJsWSDXZmJAjtoUq4zS4eqHyXImpktvHOZwXp1XQjO5H+YQwsBgqTQEc0J/5zg==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.7.8.tgz", + "integrity": "sha512-TLQxyD9qGOIdX5LPQOPo0Ernd88U5rHkFb8WAjeMIeA0sPjCHeVPaGqUGGIXjUcblUkjuDAc07bruCcNHUrHDA==", "dev": true, "requires": { - "@webassemblyjs/wast-printer": "1.7.6" + "@webassemblyjs/wast-printer": "1.7.8" } }, "@webassemblyjs/helper-fsm": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.6.tgz", - "integrity": "sha512-HCS6KN3wgxUihGBW7WFzEC/o8Eyvk0d56uazusnxXthDPnkWiMv+kGi9xXswL2cvfYfeK5yiM17z2K5BVlwypw==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.7.8.tgz", + "integrity": "sha512-TjK0CnD8hAPkV5mbSp5aWl6SO1+H3WFcjWtixWoy8EMA99YnNzYhpc/WSYWhf7yrhpzkq5tZB0tvLK3Svr3IXA==", "dev": true }, "@webassemblyjs/helper-module-context": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.6.tgz", - "integrity": "sha512-e8/6GbY7OjLM+6OsN7f2krC2qYVNaSr0B0oe4lWdmq5sL++8dYDD1TFbD1TdAdWMRTYNr/Qq7ovXWzia2EbSjw==", - "dev": true, - "requires": { - "mamacro": "^0.0.3" - } + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.7.8.tgz", + "integrity": "sha512-uCutAKR7Nm0VsFixcvnB4HhAyHouNbj0Dx1p7eRjFjXGGZ+N7ftTaG1ZbWCasAEbtwGj54LP8+lkBZdTCPmLGg==", + "dev": true }, "@webassemblyjs/helper-wasm-bytecode": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.6.tgz", - "integrity": "sha512-PzYFCb7RjjSdAOljyvLWVqd6adAOabJW+8yRT+NWhXuf1nNZWH+igFZCUK9k7Cx7CsBbzIfXjJc7u56zZgFj9Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.7.8.tgz", + "integrity": "sha512-AdCCE3BMW6V34WYaKUmPgVHa88t2Z14P4/0LjLwuGkI0X6pf7nzp0CehzVVk51cKm2ymVXjl9dCG+gR1yhITIQ==", "dev": true }, "@webassemblyjs/helper-wasm-section": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.6.tgz", - "integrity": "sha512-3GS628ppDPSuwcYlQ7cDCGr4W2n9c4hLzvnRKeuz+lGsJSmc/ADVoYpm1ts2vlB1tGHkjtQMni+yu8mHoMlKlA==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.7.8.tgz", + "integrity": "sha512-BkBhYQuzyl4hgTGOKo87Vdw6f9nj8HhI7WYpI0MCC5qFa5ahrAPOGgyETVdnRbv+Rjukl9MxxfDmVcVC435lDg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-buffer": "1.7.8", + "@webassemblyjs/helper-wasm-bytecode": "1.7.8", + "@webassemblyjs/wasm-gen": "1.7.8" } }, "@webassemblyjs/ieee754": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.6.tgz", - "integrity": "sha512-V4cIp0ruyw+hawUHwQLn6o2mFEw4t50tk530oKsYXQhEzKR+xNGDxs/SFFuyTO7X3NzEu4usA3w5jzhl2RYyzQ==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.7.8.tgz", + "integrity": "sha512-tOarWChdG1a3y1yqCX0JMDKzrat5tQe4pV6K/TX19BcXsBLYxFQOL1DEDa5KG9syeyvCrvZ+i1+Mv1ExngvktQ==", "dev": true, "requires": { "@xtuc/ieee754": "^1.2.0" } }, "@webassemblyjs/leb128": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.6.tgz", - "integrity": "sha512-ojdlG8WpM394lBow4ncTGJoIVZ4aAtNOWHhfAM7m7zprmkVcKK+2kK5YJ9Bmj6/ketTtOn7wGSHCtMt+LzqgYQ==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.7.8.tgz", + "integrity": "sha512-GCYeGPgUFWJiZuP4NICbcyUQNxNLJIf476Ei+K+jVuuebtLpfvwkvYT6iTUE7oZYehhkor4Zz2g7SJ/iZaPudQ==", "dev": true, "requires": { "@xtuc/long": "4.2.1" } }, "@webassemblyjs/utf8": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.6.tgz", - "integrity": "sha512-oId+tLxQ+AeDC34ELRYNSqJRaScB0TClUU6KQfpB8rNT6oelYlz8axsPhf6yPTg7PBJ/Z5WcXmUYiHEWgbbHJw==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.7.8.tgz", + "integrity": "sha512-9X+f0VV+xNXW2ujfIRSXBJENGE6Qh7bNVKqu3yDjTFB3ar3nsThsGBBKdTG58aXOm2iUH6v28VIf88ymPXODHA==", "dev": true }, "@webassemblyjs/wasm-edit": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.6.tgz", - "integrity": "sha512-pTNjLO3o41v/Vz9VFLl+I3YLImpCSpodFW77pNoH4agn5I6GgSxXHXtvWDTvYJFty0jSeXZWLEmbaSIRUDlekg==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.7.8.tgz", + "integrity": "sha512-6D3Hm2gFixrfyx9XjSON4ml1FZTugqpkIz5Awvrou8fnpyprVzcm4X8pyGRtA2Piixjl3DqmX/HB1xdWyE097A==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/helper-wasm-section": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6", - "@webassemblyjs/wasm-opt": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6", - "@webassemblyjs/wast-printer": "1.7.6" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-buffer": "1.7.8", + "@webassemblyjs/helper-wasm-bytecode": "1.7.8", + "@webassemblyjs/helper-wasm-section": "1.7.8", + "@webassemblyjs/wasm-gen": "1.7.8", + "@webassemblyjs/wasm-opt": "1.7.8", + "@webassemblyjs/wasm-parser": "1.7.8", + "@webassemblyjs/wast-printer": "1.7.8" } }, "@webassemblyjs/wasm-gen": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.6.tgz", - "integrity": "sha512-mQvFJVumtmRKEUXMohwn8nSrtjJJl6oXwF3FotC5t6e2hlKMh8sIaW03Sck2MDzw9xPogZD7tdP5kjPlbH9EcQ==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.7.8.tgz", + "integrity": "sha512-a7O/wE6eBeVKKUYgpMK7NOHmMADD85rSXLe3CqrWRDwWff5y3cSVbzpN6Qv3z6C4hdkpq9qyij1Ga1kemOZGvQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/ieee754": "1.7.6", - "@webassemblyjs/leb128": "1.7.6", - "@webassemblyjs/utf8": "1.7.6" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-wasm-bytecode": "1.7.8", + "@webassemblyjs/ieee754": "1.7.8", + "@webassemblyjs/leb128": "1.7.8", + "@webassemblyjs/utf8": "1.7.8" } }, "@webassemblyjs/wasm-opt": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.6.tgz", - "integrity": "sha512-go44K90fSIsDwRgtHhX14VtbdDPdK2sZQtZqUcMRvTojdozj5tLI0VVJAzLCfz51NOkFXezPeVTAYFqrZ6rI8Q==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.7.8.tgz", + "integrity": "sha512-3lbQ0PT81NHCdi1sR/7+SNpZadM4qYcTSr62nFFAA7e5lFwJr14M1Gi+A/Y3PgcDWOHYjsaNGPpPU0H03N6Blg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-buffer": "1.7.6", - "@webassemblyjs/wasm-gen": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-buffer": "1.7.8", + "@webassemblyjs/wasm-gen": "1.7.8", + "@webassemblyjs/wasm-parser": "1.7.8" } }, "@webassemblyjs/wasm-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.6.tgz", - "integrity": "sha512-t1T6TfwNY85pDA/HWPA8kB9xA4sp9ajlRg5W7EKikqrynTyFo+/qDzIpvdkOkOGjlS6d4n4SX59SPuIayR22Yg==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.7.8.tgz", + "integrity": "sha512-rZ/zlhp9DHR/05zh1MbAjT2t624sjrPP/OkJCjXqzm7ynH+nIdNcn9Ixc+qzPMFXhIrk0rBoQ3to6sEIvHh9jQ==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-api-error": "1.7.6", - "@webassemblyjs/helper-wasm-bytecode": "1.7.6", - "@webassemblyjs/ieee754": "1.7.6", - "@webassemblyjs/leb128": "1.7.6", - "@webassemblyjs/utf8": "1.7.6" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-api-error": "1.7.8", + "@webassemblyjs/helper-wasm-bytecode": "1.7.8", + "@webassemblyjs/ieee754": "1.7.8", + "@webassemblyjs/leb128": "1.7.8", + "@webassemblyjs/utf8": "1.7.8" } }, "@webassemblyjs/wast-parser": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.6.tgz", - "integrity": "sha512-1MaWTErN0ziOsNUlLdvwS+NS1QWuI/kgJaAGAMHX8+fMJFgOJDmN/xsG4h/A1Gtf/tz5VyXQciaqHZqp2q0vfg==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.7.8.tgz", + "integrity": "sha512-Q/zrvtUvzWuSiJMcSp90fi6gp2nraiHXjTV2VgAluVdVapM4gy1MQn7akja2p6eSBDQpKJPJ6P4TxRkghRS5dg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/floating-point-hex-parser": "1.7.6", - "@webassemblyjs/helper-api-error": "1.7.6", - "@webassemblyjs/helper-code-frame": "1.7.6", - "@webassemblyjs/helper-fsm": "1.7.6", - "@xtuc/long": "4.2.1", - "mamacro": "^0.0.3" + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/floating-point-hex-parser": "1.7.8", + "@webassemblyjs/helper-api-error": "1.7.8", + "@webassemblyjs/helper-code-frame": "1.7.8", + "@webassemblyjs/helper-fsm": "1.7.8", + "@xtuc/long": "4.2.1" } }, "@webassemblyjs/wast-printer": { - "version": "1.7.6", - "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.6.tgz", - "integrity": "sha512-vHdHSK1tOetvDcl1IV1OdDeGNe/NDDQ+KzuZHMtqTVP1xO/tZ/IKNpj5BaGk1OYFdsDWQqb31PIwdEyPntOWRQ==", + "version": "1.7.8", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.7.8.tgz", + "integrity": "sha512-GllIthRtwTxRDAURRNXscu7Napzmdf1jt1gpiZiK/QN4fH0lSGs3OTmvdfsMNP7tqI4B3ZtfaaWRlNIQug6Xyg==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/wast-parser": "1.7.6", + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/wast-parser": "1.7.8", "@xtuc/long": "4.2.1" } }, @@ -286,9 +281,9 @@ } }, "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -303,40 +298,6 @@ "integrity": "sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=", "dev": true }, - "align-text": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", - "integrity": "sha1-DNkKVhCT810KmSVsIrcGlDP60Rc=", - "dev": true, - "requires": { - "kind-of": "^3.0.2", - "longest": "^1.0.1", - "repeat-string": "^1.5.2" - }, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true, - "requires": { - "is-buffer": "^1.1.5" - } - } - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-escapes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.1.0.tgz", - "integrity": "sha512-UgAb8H9D41AQnu/PbWlCofQVcnV4Gs2bBJi9eZPxfU/hgglFh3SMDMENRIqdr7H6XFnXdoknctFByVsCOotTVw==", - "dev": true - }, "ansi-regex": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", @@ -451,10 +412,13 @@ "dev": true }, "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.1.tgz", + "integrity": "sha512-fNEiL2+AZt6AlAw/29Cr0UDe4sRAHCpEHh54WMz+Bb7QfNcFw4h3loofyJpLeQs4Yx7yuqu/2dLgM5hKOs6HlQ==", + "dev": true, + "requires": { + "lodash": "^4.17.10" + } }, "async-each": { "version": "1.0.1", @@ -579,15 +543,15 @@ "dev": true }, "binary-extensions": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.11.0.tgz", - "integrity": "sha1-RqoXUftqL5PuXmibsQh9SxTGwgU=", + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.12.0.tgz", + "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==", "dev": true }, "binaryen": { - "version": "51.0.0", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-51.0.0.tgz", - "integrity": "sha512-Iop30WDVekq1MV2ygWHvL0mzSUQLH7m8VB3DHpU3MTdQoPj8LoRWK4U5b5nAlHLYYU1v/tIkdmiPrGgx8ANSfw==" + "version": "51.0.0-nightly.20181010", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-51.0.0-nightly.20181010.tgz", + "integrity": "sha512-zsarngrxO6hDyWcIHDUR4Uo3bls8EaywKo5+VhtaV2PwbqQtUr8ZnTdhWS6Xx6pWFQqfuJEz9pPk+GZ1wByJAQ==" }, "bluebird": { "version": "3.5.2", @@ -646,14 +610,14 @@ "dev": true }, "browser-process-hrtime": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.2.tgz", - "integrity": "sha1-Ql1opY00R/AqBKqJQYf86K+Le44=", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-1.0.0.tgz", + "integrity": "sha512-9o5UecI3GhkpM6DrXr69PblIuWxPKk9Y0jHBRhdocZ2y7YECBFCsHm79Pr3OyR2AvjhDkabFJaDJMYRazHgsow==", "dev": true }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -690,7 +654,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -724,7 +688,7 @@ }, "buffer": { "version": "4.9.1", - "resolved": "http://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.1.tgz", "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true, "requires": { @@ -801,17 +765,6 @@ "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", "dev": true }, - "center-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", - "integrity": "sha1-qg0yYptu6XIgBBHL1EYckHvCt60=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.3", - "lazy-cache": "^1.0.3" - } - }, "chalk": { "version": "2.4.1", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", @@ -823,12 +776,6 @@ "supports-color": "^5.3.0" } }, - "chardet": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.5.0.tgz", - "integrity": "sha512-9ZTaoBaePSCFvNlNGrsyI8ZVACP2svUtq0DkM7t4K2ClAa96sqOIRjAzDTc8zXzFt1cZR46rRzLTiHFSJ+Qw0g==", - "dev": true - }, "chokidar": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.0.4.tgz", @@ -851,9 +798,9 @@ } }, "chownr": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.0.1.tgz", - "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true }, "chrome-trace-event": { @@ -898,21 +845,6 @@ } } }, - "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", - "dev": true, - "requires": { - "restore-cursor": "^2.0.0" - } - }, - "cli-width": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-2.2.0.tgz", - "integrity": "sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk=", - "dev": true - }, "cliui": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", @@ -1060,7 +992,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -1073,7 +1005,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -1099,9 +1031,9 @@ }, "dependencies": { "semver": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", - "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true } } @@ -1146,13 +1078,6 @@ "ms": "2.0.0" } }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "optional": true - }, "decode-uri-component": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", @@ -1218,7 +1143,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -1276,9 +1201,9 @@ } }, "enhanced-resolve": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz", - "integrity": "sha512-jox/62b2GofV1qTUQTMPEJSDIGycS43evqYzD/KVtEb9OCoki9cnacUPxCrZa7JfPzZSYOCZhu9O9luaMxAX8g==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -1355,31 +1280,18 @@ } }, "execa": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz", - "integrity": "sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c=", + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-0.10.0.tgz", + "integrity": "sha512-7XOMnz8Ynx1gGo/3hyV9loYNPWM94jG3+3T3Y8tsfSstFmETmENCMU/A/zj8Lyaj1lkgEepKepvd6240tBRvlw==", "dev": true, "requires": { - "cross-spawn": "^5.0.1", + "cross-spawn": "^6.0.0", "get-stream": "^3.0.0", "is-stream": "^1.1.0", "npm-run-path": "^2.0.0", "p-finally": "^1.0.0", "signal-exit": "^3.0.0", "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } } }, "expand-brackets": { @@ -1438,17 +1350,6 @@ } } }, - "external-editor": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.0.0.tgz", - "integrity": "sha512-mpkfj0FEdxrIhOC04zk85X7StNtr0yXnG7zCb+8ikO8OJi2jsHh5YGoknNTyXgsbHOf1WOOcVU3kPFWT2WgCkQ==", - "dev": true, - "requires": { - "chardet": "^0.5.0", - "iconv-lite": "^0.4.22", - "tmp": "^0.0.33" - } - }, "extglob": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", @@ -1526,15 +1427,6 @@ "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", "dev": true }, - "figures": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", - "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5" - } - }, "fill-range": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", @@ -1614,9 +1506,9 @@ } }, "fs-extra": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-5.0.0.tgz", - "integrity": "sha512-66Pm4RYbjzdyeuqudYqhFiNBbCIuI9kgRqLPSHIlXHidW8NIQtVdkM1yeZ4lXwuhbTETv3EUGMNHAAw6hiundQ==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.0.tgz", + "integrity": "sha512-EglNDLRpmaTWiD/qraZn6HREAEAHJcJOmxNEYwq6xeMKnVMAy3GUcFB+wXt2C6k4CNvB/mP1y/U3dzvKKj5OtQ==", "dev": true, "requires": { "graceful-fs": "^4.1.2", @@ -2235,84 +2127,39 @@ "dev": true }, "handlebars": { - "version": "4.0.11", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.11.tgz", - "integrity": "sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw=", + "version": "4.0.12", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", + "integrity": "sha512-RhmTekP+FZL+XNhwS1Wf+bTTZpdLougwt5pcgA1tuz6Jcx0fpH/7z0qd71RKnZHBCxIRBHfBOnio4gViPemNzA==", "dev": true, "requires": { - "async": "^1.4.0", + "async": "^2.5.0", "optimist": "^0.6.1", - "source-map": "^0.4.4", - "uglify-js": "^2.6" + "source-map": "^0.6.1", + "uglify-js": "^3.1.4" }, "dependencies": { - "camelcase": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", - "integrity": "sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk=", + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", "dev": true, "optional": true }, - "cliui": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", - "integrity": "sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE=", - "dev": true, - "optional": true, - "requires": { - "center-align": "^0.1.1", - "right-align": "^0.1.1", - "wordwrap": "0.0.2" - } - }, "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "uglify-js": { - "version": "2.8.29", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", - "integrity": "sha1-KcVzMUgFe7Th913zW3qcty5qWd0=", + "version": "3.4.9", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.4.9.tgz", + "integrity": "sha512-8CJsbKOtEbnJsTyv6LE6m6ZKniqMiFWmm9sRbopbkGs3gMPPfd3Fh8iIA4Ykv5MgaTbqHr4BaoGLJLZNhsrW1Q==", "dev": true, "optional": true, "requires": { - "source-map": "~0.5.1", - "uglify-to-browserify": "~1.0.0", - "yargs": "~3.10.0" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "optional": true - } - } - }, - "wordwrap": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", - "integrity": "sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8=", - "dev": true, - "optional": true - }, - "yargs": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", - "integrity": "sha1-9+572FfdfB0tOMDnTvvWgdFDH9E=", - "dev": true, - "optional": true, - "requires": { - "camelcase": "^1.0.2", - "cliui": "^2.1.0", - "decamelize": "^1.0.0", - "window-size": "0.1.0" + "commander": "~2.17.1", + "source-map": "~0.6.1" } } } @@ -2407,15 +2254,6 @@ "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", "dev": true }, - "iconv-lite": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", - "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, "ieee754": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", @@ -2429,13 +2267,67 @@ "dev": true }, "import-local": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz", - "integrity": "sha512-vAaZHieK9qjGo58agRBg+bhHX3hoTZU/Oa3GESWLz7t1U62fk63aHuDJJEteXoDeTCcPmUT+z38gkHPZkkmpmQ==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz", + "integrity": "sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ==", "dev": true, "requires": { - "pkg-dir": "^2.0.0", + "pkg-dir": "^3.0.0", "resolve-cwd": "^2.0.0" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", + "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", + "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "dev": true + }, + "pkg-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", + "dev": true, + "requires": { + "find-up": "^3.0.0" + } + } } }, "imurmurhash": { @@ -2464,44 +2356,6 @@ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" }, - "inquirer": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.0.0.tgz", - "integrity": "sha512-tISQWRwtcAgrz+SHPhTH7d3e73k31gsOy6i1csonLc0u1dVK/wYvuOnFeiWqC5OXFIYbmrIFInef31wbT8MEJg==", - "dev": true, - "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", - "cli-cursor": "^2.1.0", - "cli-width": "^2.0.0", - "external-editor": "^3.0.0", - "figures": "^2.0.0", - "lodash": "^4.3.0", - "mute-stream": "0.0.7", - "run-async": "^2.2.0", - "rxjs": "^6.1.0", - "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", - "through": "^2.3.6" - }, - "dependencies": { - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - } - } - }, "interpret": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", @@ -2509,9 +2363,9 @@ "dev": true }, "invert-kv": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", - "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", "dev": true }, "is-accessor-descriptor": { @@ -2644,12 +2498,6 @@ "isobject": "^3.0.1" } }, - "is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.1.0.tgz", - "integrity": "sha1-eaKp7OfwlugPNtKy87wWwf9L8/o=", - "dev": true - }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -2729,26 +2577,19 @@ "integrity": "sha512-s5kLOcnH0XqDO+FvuaLX8DDjZ18CGFk7VygH40QoKPUQhW4e2rvM0rwUq0t8IQDOwYSeLK01U90OjzBTme2QqA==", "dev": true }, - "lazy-cache": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", - "integrity": "sha1-odePw6UEdMuAhF07O24dpJpEbo4=", - "dev": true, - "optional": true - }, "lcid": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", - "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", "dev": true, "requires": { - "invert-kv": "^1.0.0" + "invert-kv": "^2.0.0" } }, "loader-runner": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.0.tgz", - "integrity": "sha1-9IKuqC1UPgeSFwDVpG7yb9rGuKI=", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-2.3.1.tgz", + "integrity": "sha512-By6ZFY7ETWOc9RFaAIb23IjJVcM4dvJC/N57nmdz9RSkMXvAXGI7SyVlAw3v8vjtDRlqThgVDVmTnr9fqMlxkw==", "dev": true }, "loader-utils": { @@ -2773,9 +2614,9 @@ } }, "lodash": { - "version": "4.17.5", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.5.tgz", - "integrity": "sha512-svL3uiZf1RwhH+cWrfZn3A4+U58wbP0tGVTLQPbjplZxZ8ROD9VLuNgsRniTlLe7OlSqR79RUehXgpBW/s0IQw==", + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", "dev": true }, "lodash.debounce": { @@ -2789,12 +2630,6 @@ "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" }, - "longest": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", - "integrity": "sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc=", - "dev": true - }, "lru-cache": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", @@ -2820,11 +2655,14 @@ "integrity": "sha512-0Dab5btKVPhibSalc9QGXb559ED7G7iLjFXBaj9Wq8O3vorueR5K5jaE3hkG6ZQINyhA/JgG6Qk4qdFQjsYV6g==", "dev": true }, - "mamacro": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/mamacro/-/mamacro-0.0.3.tgz", - "integrity": "sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA==", - "dev": true + "map-age-cleaner": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz", + "integrity": "sha512-UN1dNocxQq44IhJyMI4TU8phc2m9BddacHRPRjKGLYaF0jqd3xLz0jS0skpAU9WgYyoR4gHtUpzytNBS385FWQ==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } }, "map-cache": { "version": "0.2.2", @@ -2842,28 +2680,31 @@ } }, "marked": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.17.tgz", - "integrity": "sha512-+AKbNsjZl6jFfLPwHhWmGTqE009wTKn3RTmn9K8oUKHrX/abPJjtcRtXpYB/FFrwPJRUA86LX/de3T0knkPCmQ==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.4.0.tgz", + "integrity": "sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw==", "dev": true }, "md5.js": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.4.tgz", - "integrity": "sha1-6b296UogpawYsENA/Fdk1bCdkB0=", + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", "dev": true, "requires": { "hash-base": "^3.0.0", - "inherits": "^2.0.1" + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "mem": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-1.1.0.tgz", - "integrity": "sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.0.0.tgz", + "integrity": "sha512-WQxG/5xYc3tMbYLXoXPm81ET2WDULiU5FxbuIoNbJqLOOI8zehXFdZuiUEgfdrU2mVB1pxBZUGlYORSrpuJreA==", "dev": true, "requires": { - "mimic-fn": "^1.0.0" + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^1.0.0", + "p-is-promise": "^1.1.0" } }, "memory-fs": { @@ -3015,16 +2856,10 @@ "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true }, - "mute-stream": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", - "integrity": "sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=", - "dev": true - }, "nan": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.0.tgz", - "integrity": "sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw==", + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", + "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", "dev": true, "optional": true }, @@ -3054,9 +2889,9 @@ "dev": true }, "nice-try": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.4.tgz", - "integrity": "sha512-2NpiFHqC87y/zFke0fC0spBXL3bBsoh/p5H1EFhshxjCR5+0g2d6BiXbUFz9v1sAcxsk2htp2eQnNIci2dIYcA==", + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", "dev": true }, "node-libs-browser": { @@ -3179,15 +3014,6 @@ "wrappy": "1" } }, - "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", - "dev": true, - "requires": { - "mimic-fn": "^1.0.0" - } - }, "optimist": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.6.1.tgz", @@ -3200,7 +3026,7 @@ "dependencies": { "minimist": { "version": "0.0.10", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz", "integrity": "sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8=", "dev": true } @@ -3213,20 +3039,20 @@ "dev": true }, "os-locale": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", - "integrity": "sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA==", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.0.1.tgz", + "integrity": "sha512-7g5e7dmXPtzcP4bgsZ8ixDVqA7oWYuEz4lOSujeWyliPai4gfVDiFIcwBg3aGCPnmSGfzOKTK3ccPn0CKv3DBw==", "dev": true, "requires": { - "execa": "^0.7.0", - "lcid": "^1.0.0", - "mem": "^1.1.0" + "execa": "^0.10.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" } }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", "dev": true }, "p-finally": { @@ -3235,6 +3061,12 @@ "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", "dev": true }, + "p-is-promise": { + "version": "1.1.0", + "resolved": "http://registry.npmjs.org/p-is-promise/-/p-is-promise-1.1.0.tgz", + "integrity": "sha1-nJRWmJ6fZYgBewQ01WCXZ1w9oF4=", + "dev": true + }, "p-limit": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", @@ -3278,7 +3110,7 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { @@ -3331,9 +3163,9 @@ "dev": true }, "pbkdf2": { - "version": "3.0.16", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.16.tgz", - "integrity": "sha512-y4CXP3thSxqf7c0qmOF+9UeOTrifiVTIM+u7NWlq+PRsHbr7r7dpCmvzrZxa96JJUNi0Y5w9VqG5ZNeCVMoDcA==", + "version": "3.0.17", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.17.tgz", + "integrity": "sha512-U/il5MsrZp7mGg3mSQfn742na2T+1/vHDCG5/iTI3X9MKUuYUZVLQhyRsg06mCgDBTd57TxzgZt7P+fYfjRLtA==", "dev": true, "requires": { "create-hash": "^1.1.2", @@ -3401,16 +3233,17 @@ "dev": true }, "public-encrypt": { - "version": "4.0.2", - "resolved": "http://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", - "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", "dev": true, "requires": { "bn.js": "^4.1.0", "browserify-rsa": "^4.0.0", "create-hash": "^1.1.0", "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1" + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" } }, "pump": { @@ -3576,32 +3409,12 @@ "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", "dev": true }, - "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", - "dev": true, - "requires": { - "onetime": "^2.0.0", - "signal-exit": "^3.0.2" - } - }, "ret": { "version": "0.1.15", "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", "dev": true }, - "right-align": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", - "integrity": "sha1-YTObci/mo1FWiSENJOFMlhSGE+8=", - "dev": true, - "optional": true, - "requires": { - "align-text": "^0.1.1" - } - }, "rimraf": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.2.tgz", @@ -3621,15 +3434,6 @@ "inherits": "^2.0.1" } }, - "run-async": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.3.0.tgz", - "integrity": "sha1-A3GrSuC91yDUFm19/aZP96RFpsA=", - "dev": true, - "requires": { - "is-promise": "^2.1.0" - } - }, "run-queue": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz", @@ -3639,15 +3443,6 @@ "aproba": "^1.1.1" } }, - "rxjs": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.2.2.tgz", - "integrity": "sha512-0MI8+mkKAXZUF9vMrEoPnaoHkfzBPP4IGwUYRJhIRJF6/w3uByO1e91bEHn8zd43RdkTMKiooYKmwz7RH6zfOQ==", - "dev": true, - "requires": { - "tslib": "^1.9.0" - } - }, "safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", @@ -3663,12 +3458,6 @@ "ret": "~0.1.10" } }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, "schema-utils": { "version": "0.4.7", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz", @@ -3728,7 +3517,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -3752,9 +3541,9 @@ "dev": true }, "shelljs": { - "version": "0.8.1", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.1.tgz", - "integrity": "sha512-YA/iYtZpzFe5HyWVGrb02FjPxc4EMCfpoU/Phg9fQoyMC72u9598OUBrsU8IrtwAKG0tO8IYaqbaLIw+k3IRGA==", + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz", + "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", "dev": true, "requires": { "glob": "^7.0.0", @@ -3876,9 +3665,9 @@ } }, "source-list-map": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", - "integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.1.tgz", + "integrity": "sha512-qnQ7gVMxGNxsiL4lEuJwe/To8UnK7fAnmbGEEH8RpLouuKbeEm0lhbQVFIrNSuB+G7tVrAlVsZgETT5nljf+Iw==", "dev": true }, "source-map": { @@ -4074,12 +3863,6 @@ "integrity": "sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg==", "dev": true }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, "through2": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", @@ -4099,15 +3882,6 @@ "setimmediate": "^1.0.4" } }, - "tmp": { - "version": "0.0.33", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", - "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", - "dev": true, - "requires": { - "os-tmpdir": "~1.0.2" - } - }, "to-arraybuffer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", @@ -4157,9 +3931,9 @@ } }, "ts-loader": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-4.5.0.tgz", - "integrity": "sha512-ihgVaSmgrX4crGV4n7yuoHPoCHbDzj9aepCZR9TgIx4SgJ9gdnB6xLHgUBb7bsFM/f0K6x9iXa65KY/Fu1Klkw==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.2.1.tgz", + "integrity": "sha512-KC0cOvsFVyxBlg5h9jvaMlIL2tNsyQLvT2/OvIlO0AMUBJ4iXTtOfaDEqvmqv2lM/icekQfDsP2PsYBCDHpuOQ==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -4233,36 +4007,28 @@ "dev": true }, "typedoc": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.11.1.tgz", - "integrity": "sha512-jdNIoHm5wkZqxQTe/g9AQ3LKnZyrzHXqu6A/c9GUOeJyBWLxNr7/Dm3rwFvLksuxRNwTvY/0HRDU9sJTa9WQSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.13.0.tgz", + "integrity": "sha512-jQWtvPcV+0fiLZAXFEe70v5gqjDO6pJYJz4mlTtmGJeW2KRoIU/BEfktma6Uj8Xii7UakuZjbxFewl3UYOkU/w==", "dev": true, "requires": { - "@types/fs-extra": "5.0.1", - "@types/handlebars": "4.0.36", - "@types/highlight.js": "9.12.2", - "@types/lodash": "4.14.104", - "@types/marked": "0.3.0", + "@types/fs-extra": "^5.0.3", + "@types/handlebars": "^4.0.38", + "@types/highlight.js": "^9.12.3", + "@types/lodash": "^4.14.110", + "@types/marked": "^0.4.0", "@types/minimatch": "3.0.3", - "@types/shelljs": "0.7.8", - "fs-extra": "^5.0.0", + "@types/shelljs": "^0.8.0", + "fs-extra": "^7.0.0", "handlebars": "^4.0.6", "highlight.js": "^9.0.0", - "lodash": "^4.17.5", - "marked": "^0.3.17", + "lodash": "^4.17.10", + "marked": "^0.4.0", "minimatch": "^3.0.0", "progress": "^2.0.0", - "shelljs": "^0.8.1", + "shelljs": "^0.8.2", "typedoc-default-themes": "^0.5.0", - "typescript": "2.7.2" - }, - "dependencies": { - "typescript": { - "version": "2.7.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.7.2.tgz", - "integrity": "sha512-p5TCYZDAO0m4G344hD+wx/LATebLWZNkkh2asWUFqSsD2OrDNhbAHuSjobrmsUmdzjJjEeZVU9g1h3O6vpstnw==", - "dev": true - } + "typescript": "3.1.x" } }, "typedoc-default-themes": { @@ -4278,9 +4044,9 @@ "dev": true }, "typescript": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.0.3.tgz", - "integrity": "sha512-kk80vLW9iGtjMnIv11qyxLqZm20UklzuR2tL0QAnDIygIUIemcZMxlMWudl9OOt76H3ntVzcTiddQ1/pAAJMYg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.2.tgz", + "integrity": "sha512-gOoGJWbNnFAfP9FlrSV63LYD5DJqYJHG5ky1kOXSl3pCImn4rqWy/flyq1BRd4iChQsoCqjbQaqtmXO4yCVPCA==", "dev": true }, "uglify-es": { @@ -4307,13 +4073,6 @@ } } }, - "uglify-to-browserify": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", - "integrity": "sha1-bgkk1r2mta/jSeOabWMoUKD4grc=", - "dev": true, - "optional": true - }, "uglifyjs-webpack-plugin": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-1.3.0.tgz", @@ -4374,27 +4133,27 @@ } }, "unique-filename": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.0.tgz", - "integrity": "sha1-0F8v5AMlYIcfMOk8vnNe6iAVFPM=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", + "integrity": "sha512-Vmp0jIp2ln35UTXuryvjzkjGdRyf9b2lTXuSYUiPmzRcl3FDtYqAwOnTJkAngD9SWhnoJzDbTKwaOrZ+STtxNQ==", "dev": true, "requires": { "unique-slug": "^2.0.0" } }, "unique-slug": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", + "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", "dev": true, "requires": { "imurmurhash": "^0.1.4" } }, "universalify": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.1.tgz", - "integrity": "sha1-+nG63UQ3r0wUiEHjs7Fl+enlkLc=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, "unset-value": { @@ -4498,9 +4257,9 @@ "dev": true }, "v8-compile-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.0.tgz", - "integrity": "sha512-qNdTUMaCjPs4eEnM3W9H94R3sU70YCuT+/ST7nUf+id1bVOrdjrpUaeZLqPBPRph3hsgn4a4BvwpxhHZx+oSDg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz", + "integrity": "sha512-1wFuMUIM16MDJRCrpbpuEPTUGmM5QMUg0cr3KFwra2XgOgFcPGDQHDh3CszSCD2Zewc/dh/pamNEW8CbfDebUw==", "dev": true }, "vm-browserify": { @@ -4524,15 +4283,15 @@ } }, "webpack": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.18.1.tgz", - "integrity": "sha512-YAKkdiasBy+XJqdxmr00NvL69I6TImnap/3+6YNEkS4lRMAfRCLEmtGWCIB0hGhb+qWDTdTV3C+zTPmctOhJ7Q==", + "version": "4.20.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.20.2.tgz", + "integrity": "sha512-75WFUMblcWYcocjSLlXCb71QuGyH7egdBZu50FtBGl2Nso8CK3Ej+J7bTZz2FPFq5l6fzCisD9modB7t30ikuA==", "dev": true, "requires": { - "@webassemblyjs/ast": "1.7.6", - "@webassemblyjs/helper-module-context": "1.7.6", - "@webassemblyjs/wasm-edit": "1.7.6", - "@webassemblyjs/wasm-parser": "1.7.6", + "@webassemblyjs/ast": "1.7.8", + "@webassemblyjs/helper-module-context": "1.7.8", + "@webassemblyjs/wasm-edit": "1.7.8", + "@webassemblyjs/wasm-parser": "1.7.8", "acorn": "^5.6.2", "acorn-dynamic-import": "^3.0.0", "ajv": "^6.1.0", @@ -4552,7 +4311,7 @@ "tapable": "^1.1.0", "uglifyjs-webpack-plugin": "^1.2.4", "watchpack": "^1.5.0", - "webpack-sources": "^1.2.0" + "webpack-sources": "^1.3.0" }, "dependencies": { "enhanced-resolve": { @@ -4575,28 +4334,49 @@ } }, "webpack-cli": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.0.tgz", - "integrity": "sha512-p5NeKDtYwjZozUWq6kGNs9w+Gtw/CPvyuXjXn2HMdz8Tie+krjEg8oAtonvIyITZdvpF7XG9xDHwscLr2c+ugQ==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", + "integrity": "sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==", "dev": true, "requires": { "chalk": "^2.4.1", "cross-spawn": "^6.0.5", - "enhanced-resolve": "^4.0.0", - "global-modules-path": "^2.1.0", - "import-local": "^1.0.0", - "inquirer": "^6.0.0", + "enhanced-resolve": "^4.1.0", + "global-modules-path": "^2.3.0", + "import-local": "^2.0.0", "interpret": "^1.1.0", "loader-utils": "^1.1.0", - "supports-color": "^5.4.0", - "v8-compile-cache": "^2.0.0", - "yargs": "^12.0.1" + "supports-color": "^5.5.0", + "v8-compile-cache": "^2.0.2", + "yargs": "^12.0.2" + }, + "dependencies": { + "enhanced-resolve": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz", + "integrity": "sha512-F/7vkyTtyc/llOIn8oWclcB25KdRaiPBpZYDgJHgh/UHtpgT2p2eldQgtQnLtUvfMKPKxbRaQM/hHkvLHt1Vng==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "memory-fs": "^0.4.0", + "tapable": "^1.0.0" + } + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } } }, "webpack-sources": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.2.0.tgz", - "integrity": "sha512-9BZwxR85dNsjWz3blyxdOhTgtnQvv3OEs5xofI0wPYTwu5kaWxS08UuD1oI7WLBLpRO+ylf0ofnXLXWmGb2WMw==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-1.3.0.tgz", + "integrity": "sha512-OiVgSrbGu7NEnEvQJJgdSFPl2qWKkWq5lHMhgiToIiN9w34EBnjYzSYs+VbL5KoYiLNtFFa7BZIKxRED3I32pA==", "dev": true, "requires": { "source-list-map": "^2.0.0", @@ -4626,13 +4406,6 @@ "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, - "window-size": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", - "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", - "dev": true, - "optional": true - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -4710,16 +4483,16 @@ "dev": true }, "yargs": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.1.tgz", - "integrity": "sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ==", + "version": "12.0.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz", + "integrity": "sha512-e7SkEx6N6SIZ5c5H22RTZae61qtn3PYUE8JYbBFlK9sYmh3DMQ6E5ygtaG/2BW0JZi4WGgTR2IV5ChqlqrDGVQ==", "dev": true, "requires": { "cliui": "^4.0.0", "decamelize": "^2.0.0", "find-up": "^3.0.0", "get-caller-file": "^1.0.1", - "os-locale": "^2.0.0", + "os-locale": "^3.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", diff --git a/package.json b/package.json index 6ed36245..453aee34 100644 --- a/package.json +++ b/package.json @@ -12,22 +12,22 @@ }, "dependencies": { "@protobufjs/utf8": "^1.1.0", - "binaryen": "^51.0.0", + "binaryen": "51.0.0-nightly.20181010", "glob": "^7.1.3", "long": "^4.0.0" }, "devDependencies": { - "@types/node": "^10.9.4", - "browser-process-hrtime": "^0.1.2", + "@types/node": "^10.11.7", + "browser-process-hrtime": "^1.0.0", "diff": "^3.5.0", - "ts-loader": "^4.5.0", + "ts-loader": "^5.2.1", "ts-node": "^6.2.0", "tslint": "^5.11.0", - "typedoc": "^0.11.1", + "typedoc": "^0.13.0", "typedoc-plugin-external-module-name": "^1.1.3", - "typescript": "^3.0.3", - "webpack": "^4.18.1", - "webpack-cli": "^3.1.0" + "typescript": "^3.1.2", + "webpack": "^4.20.2", + "webpack-cli": "^3.1.2" }, "main": "index.js", "types": "index.d.ts", diff --git a/src/binary.ts b/src/binary.ts index 4b643a67..1c6c3ba8 100644 --- a/src/binary.ts +++ b/src/binary.ts @@ -1,3 +1,8 @@ +/** + * Binary format utilities. + * @module binary + *//***/ + // TBD: Moving lib/parse here might make sense where the compiler has to evaluate WASM binaries on // the fly, like when importing other WASM files through `import`. Module integration hasn't been // specified, yet, though, and it somewhat conflicts with our dependency on Binaryen. diff --git a/src/builtins.ts b/src/builtins.ts index a6f850ab..11acfa41 100644 --- a/src/builtins.ts +++ b/src/builtins.ts @@ -2959,7 +2959,7 @@ export function compileAbort( compiler.currentType = Type.void; return module.createBlock(null, [ - module.createCallImport( + module.createCall( abortInstance.internalName, [ messageArg, filenameArg, diff --git a/src/compiler.ts b/src/compiler.ts index d3528707..bc0580d8 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -330,6 +330,23 @@ export class Compiler extends DiagnosticEmitter { this.startFunctionBody = startFunctionBody; this.currentFunction = startFunctionInstance; + // add a mutable heap base dummy + if (options.isWasm64) { + module.addGlobal( + "HEAP_BASE", + NativeType.I64, + true, + module.createI64(0, 0) + ); + } else { + module.addGlobal( + "HEAP_BASE", + NativeType.I32, + false, + module.createI32(0) + ); + } + // compile entry file(s) while traversing reachable elements var sources = program.sources; for (let i = 0, k = sources.length; i < k; ++i) { @@ -353,10 +370,11 @@ export class Compiler extends DiagnosticEmitter { if (!program.mainFunction) module.setStart(funcRef); } - // set up static memory segments and the heap base pointer + // update the heap base pointer var memoryOffset = this.memoryOffset; memoryOffset = i64_align(memoryOffset, options.usizeType.byteSize); this.memoryOffset = memoryOffset; + module.removeGlobal("HEAP_BASE"); if (options.isWasm64) { module.addGlobal( "HEAP_BASE", @@ -392,22 +410,12 @@ export class Compiler extends DiagnosticEmitter { // set up function table var functionTable = this.functionTable; - var functionTableSize = functionTable.length; - var functionTableExported = false; - module.setFunctionTable(functionTable); - if (functionTableSize) { // index 0 is NULL - module.addFunction("null", this.ensureFunctionType(null, Type.void), null, module.createBlock(null, [])); - if (functionTableSize > 1) { - module.addTableExport("0", "table"); - functionTableExported = true; - } - } + module.setFunctionTable(functionTable.length, 0xffffffff, functionTable); + module.addTableExport("0", "table"); + module.addFunction("null", this.ensureFunctionType(null, Type.void), null, module.createBlock(null, [])); // import table if requested (default table is named '0' by Binaryen) - if (options.importTable) { - module.addTableImport("0", "env", "table"); - if (!functionTableExported) module.addTableExport("0", "table"); - } + if (options.importTable) module.addTableImport("0", "env", "table"); // set up module exports for (let [name, moduleExport] of program.moduleLevelExports) { @@ -748,7 +756,7 @@ export class Compiler extends DiagnosticEmitter { if (isDeclaredConstant || this.options.hasFeature(Feature.MUTABLE_GLOBAL)) { global.set(CommonFlags.MODULE_IMPORT); if (declaration) { - mangleImportName(global, declaration, global.parent); + mangleImportName(global, declaration); } else { mangleImportName_moduleName = "env"; mangleImportName_elementName = global.simpleName; @@ -1137,7 +1145,7 @@ export class Compiler extends DiagnosticEmitter { } else { instance.set(CommonFlags.MODULE_IMPORT); - mangleImportName(instance, declaration, instance.prototype.parent); // TODO: check for duplicates + mangleImportName(instance, declaration); // TODO: check for duplicates // create the function import ref = module.addFunctionImport( @@ -5733,9 +5741,7 @@ export class Compiler extends DiagnosticEmitter { // otherwise just call through this.currentType = returnType; - if (isCallImport) return module.createCallImport(instance.internalName, operands, returnType.toNativeType()); - var ret = module.createCall(instance.internalName, operands, returnType.toNativeType()); - return ret; + return module.createCall(instance.internalName, operands, returnType.toNativeType()); } /** Compiles an indirect call using an index argument and a signature. */ @@ -7652,11 +7658,12 @@ export class Compiler extends DiagnosticEmitter { function mangleImportName( element: Element, - declaration: DeclarationStatement, - parentElement: Element | null = null + declaration: DeclarationStatement ): void { - mangleImportName_moduleName = parentElement ? parentElement.simpleName : declaration.range.source.simplePath; - mangleImportName_elementName = element.simpleName; + // by default, use the file name as the module name + mangleImportName_moduleName = declaration.range.source.simplePath; + // and the internal name of the element within that file as the element name + mangleImportName_elementName = declaration.programLevelInternalName; if (!element.hasDecorator(DecoratorFlags.EXTERNAL)) return; @@ -7665,6 +7672,8 @@ function mangleImportName( var args = decorator.arguments; if (args && args.length) { let arg = args[0]; + // if one argument is given, override just the element name + // if two arguments are given, override both module and element name if (arg.kind == NodeKind.LITERAL && (arg).literalKind == LiteralKind.STRING) { mangleImportName_elementName = (arg).value; if (args.length >= 2) { diff --git a/src/decompiler.ts b/src/decompiler.ts index 044aedc0..83399091 100644 --- a/src/decompiler.ts +++ b/src/decompiler.ts @@ -170,7 +170,6 @@ export class Decompiler { } case ExpressionId.Switch: case ExpressionId.Call: - case ExpressionId.CallImport: case ExpressionId.CallIndirect: { throw new Error("not implemented"); } diff --git a/src/glue/binaryen.d.ts b/src/glue/binaryen.d.ts index 7c3200a6..7621f6c4 100644 --- a/src/glue/binaryen.d.ts +++ b/src/glue/binaryen.d.ts @@ -30,7 +30,6 @@ declare function _BinaryenLoopId(): BinaryenExpressionId; declare function _BinaryenBreakId(): BinaryenExpressionId; declare function _BinaryenSwitchId(): BinaryenExpressionId; declare function _BinaryenCallId(): BinaryenExpressionId; -declare function _BinaryenCallImportId(): BinaryenExpressionId; declare function _BinaryenCallIndirectId(): BinaryenExpressionId; declare function _BinaryenGetLocalId(): BinaryenExpressionId; declare function _BinaryenSetLocalId(): BinaryenExpressionId; @@ -219,7 +218,6 @@ declare function _BinaryenLoop(module: BinaryenModuleRef, name: usize, body: Bin declare function _BinaryenBreak(module: BinaryenModuleRef, name: usize, condition: BinaryenExpressionRef, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenSwitch(module: BinaryenModuleRef, names: usize, numNames: BinaryenIndex, defaultName: usize, condition: BinaryenExpressionRef, value: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenCall(module: BinaryenModuleRef, target: usize, operands: usize, numOperands: BinaryenIndex, returnType: BinaryenType): BinaryenExpressionRef; -declare function _BinaryenCallImport(module: BinaryenModuleRef, target: usize, operands: usize, numOperands: BinaryenIndex, returnType: BinaryenType): BinaryenExpressionRef; declare function _BinaryenCallIndirect(module: BinaryenModuleRef, target: BinaryenExpressionRef, operands: usize, numOperands: BinaryenIndex, type: usize): BinaryenExpressionRef; declare function _BinaryenGetLocal(module: BinaryenModuleRef, index: BinaryenIndex, type: BinaryenType): BinaryenExpressionRef; declare function _BinaryenSetLocal(module: BinaryenModuleRef, index: BinaryenIndex, value: BinaryenExpressionRef): BinaryenExpressionRef; @@ -273,10 +271,6 @@ declare function _BinaryenCallGetTarget(expr: BinaryenExpressionRef): usize; declare function _BinaryenCallGetNumOperands(expr: BinaryenExpressionRef): BinaryenIndex; declare function _BinaryenCallGetOperand(expr: BinaryenExpressionRef, index: BinaryenIndex): BinaryenExpressionRef; -declare function _BinaryenCallImportGetTarget(expr: BinaryenExpressionRef): usize; -declare function _BinaryenCallImportGetNumOperands(expr: BinaryenExpressionRef): BinaryenIndex; -declare function _BinaryenCallImportGetOperand(expr: BinaryenExpressionRef, index: BinaryenIndex): BinaryenExpressionRef; - declare function _BinaryenCallIndirectGetTarget(expr: BinaryenExpressionRef): BinaryenExpressionRef; declare function _BinaryenCallIndirectGetNumOperands(expr: BinaryenExpressionRef): BinaryenIndex; declare function _BinaryenCallIndirectGetOperand(expr: BinaryenExpressionRef, index: BinaryenIndex): BinaryenExpressionRef; @@ -387,7 +381,6 @@ declare function _BinaryenAddFunctionImport(module: BinaryenModuleRef, internalN declare function _BinaryenAddTableImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize): BinaryenImportRef; declare function _BinaryenAddMemoryImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize): BinaryenImportRef; declare function _BinaryenAddGlobalImport(module: BinaryenModuleRef, internalName: usize, externalModuleName: usize, externalBaseName: usize, globalType: BinaryenType): BinaryenImportRef; -declare function _BinaryenRemoveImport(module: BinaryenModuleRef, internalName: usize): void; declare type BinaryenExportRef = usize; @@ -400,8 +393,9 @@ declare function _BinaryenRemoveExport(module: BinaryenModuleRef, externalName: declare type BinaryenGlobalRef = usize; declare function _BinaryenAddGlobal(module: BinaryenModuleRef, name: usize, type: BinaryenType, mutable: i8, init: BinaryenExpressionRef): BinaryenGlobalRef; +declare function _BinaryenRemoveGlobal(module: BinaryenModuleRef, name: usize): void; -declare function _BinaryenSetFunctionTable(module: BinaryenModuleRef, funcs: usize, numFuncs: BinaryenIndex): void; +declare function _BinaryenSetFunctionTable(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, funcs: usize, numFuncs: BinaryenIndex): void; declare function _BinaryenSetMemory(module: BinaryenModuleRef, initial: BinaryenIndex, maximum: BinaryenIndex, exportName: usize, segments: usize, segmentOffsets: usize, segmentSizes: usize, numSegments: BinaryenIndex): void; diff --git a/src/glue/wasm/float.ts b/src/glue/wasm/float.ts index f3210942..a7a363a0 100644 --- a/src/glue/wasm/float.ts +++ b/src/glue/wasm/float.ts @@ -1,3 +1,5 @@ +/** @module glue/wasm *//***/ + @global function f32_as_i32(value: f32): i32 { return reinterpret(value); diff --git a/src/module.ts b/src/module.ts index 5877dcfd..57e0de60 100644 --- a/src/module.ts +++ b/src/module.ts @@ -34,7 +34,6 @@ export enum ExpressionId { Break = _BinaryenBreakId(), Switch = _BinaryenSwitchId(), Call = _BinaryenCallId(), - CallImport = _BinaryenCallImportId(), CallIndirect = _BinaryenCallIndirectId(), GetLocal = _BinaryenGetLocalId(), SetLocal = _BinaryenSetLocalId(), @@ -596,21 +595,6 @@ export class Module { } } - createCallImport( - target: string, - operands: ExpressionRef[] | null, - returnType: NativeType - ): ExpressionRef { - var cStr = allocString(target); - var cArr = allocPtrArray(operands); - try { - return _BinaryenCallImport(this.ref, cStr, cArr, operands && operands.length || 0, returnType); - } finally { - memory.free(cArr); - memory.free(cStr); - } - } - createCallIndirect( index: ExpressionRef, operands: ExpressionRef[] | null, @@ -646,6 +630,17 @@ export class Module { } } + removeGlobal( + name: string + ): void { + var cStr = allocString(name); + try { + _BinaryenRemoveGlobal(this.ref, cStr); + } finally { + memory.free(cStr); + } + } + addFunction( name: string, type: FunctionTypeRef, @@ -829,15 +824,6 @@ export class Module { } } - removeImport(internalName: string): void { - var cStr = allocString(internalName); - try { - _BinaryenRemoveImport(this.ref, cStr); - } finally { - memory.free(cStr); - } - } - setMemory( initial: Index, maximum: Index, @@ -873,7 +859,11 @@ export class Module { } } - setFunctionTable(funcs: string[]): void { + setFunctionTable( + initial: Index, + maximum: Index, + funcs: string[] + ): void { var numNames = funcs.length; var names = new Array(numNames); for (let i = 0; i < numNames; ++i) { @@ -881,7 +871,7 @@ export class Module { } var cArr = allocI32Array(names); try { - _BinaryenSetFunctionTable(this.ref, cArr, numNames); + _BinaryenSetFunctionTable(this.ref, initial, maximum, cArr, numNames); } finally { memory.free(cArr); for (let i = numNames; i >= 0; --i) memory.free(names[i]); diff --git a/src/parser.ts b/src/parser.ts index 24abe3a5..5c12524a 100644 --- a/src/parser.ts +++ b/src/parser.ts @@ -3268,22 +3268,9 @@ export class Parser extends DiagnosticEmitter { var expr = this.parseExpressionStart(tn); if (!expr) return null; + expr = this.maybeParseCallExpression(tn, expr); // simple call like on an Identifier + var startPos = expr.range.start; - - // CallExpression? - if (nodeIsCallable(expr.kind)) { - let typeArguments: CommonTypeNode[] | null = null; - while ( - tn.skip(Token.OPENPAREN) - || - nodeIsGenericCallable(expr.kind) && (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) !== null - ) { - let args = this.parseArguments(tn); - if (!args) return null; - expr = Node.createCallExpression(expr, typeArguments, args, tn.range(startPos, tn.pos)); // is again callable - } - } - var token: Token; var next: Expression | null = null; var nextPrecedence: Precedence; @@ -3398,28 +3385,15 @@ export class Parser extends DiagnosticEmitter { // PropertyAccessExpression if (token == Token.DOT) { - if (next.kind == NodeKind.IDENTIFIER) { + if (next.kind == NodeKind.IDENTIFIER) { // expr '.' Identifier expr = Node.createPropertyAccessExpression( expr, next, tn.range(startPos, tn.pos) ); - } else if (next.kind == NodeKind.CALL) { // join - let propertyCall = next; - if (propertyCall.expression.kind == NodeKind.IDENTIFIER) { - propertyCall.expression = Node.createPropertyAccessExpression( - expr, - propertyCall.expression, - tn.range(startPos, tn.pos) - ); - } else { - this.error( - DiagnosticCode.Identifier_expected, - propertyCall.expression.range - ); - return null; - } - expr = propertyCall; + } else if (next.kind == NodeKind.CALL) { // expr '.' CallExpression + expr = this.joinPropertyCall(tn, startPos, expr, next); + if (!expr) return null; } else { this.error( DiagnosticCode.Identifier_expected, @@ -3435,6 +3409,65 @@ export class Parser extends DiagnosticEmitter { break; } } + expr = this.maybeParseCallExpression(tn, expr); // compound call like on an ElementAccess + } + return expr; + } + + private joinPropertyCall( + tn: Tokenizer, + startPos: i32, + expr: Expression, + call: CallExpression + ): Expression | null { + var callee = call.expression; + switch (callee.kind) { + case NodeKind.IDENTIFIER: { // join property access and use as call target + call.expression = Node.createPropertyAccessExpression( + expr, + callee, + tn.range(startPos, tn.pos) + ); + break; + } + case NodeKind.CALL: { // join call target und wrap the original call around it + let inner = this.joinPropertyCall(tn, startPos, expr, callee); + if (!inner) return null; + call.expression = inner; + call.range = tn.range(startPos, tn.pos); + break; + } + default: { + this.error( + DiagnosticCode.Identifier_expected, + call.range + ); + return null; + } + } + return call; + } + + private maybeParseCallExpression( + tn: Tokenizer, + expr: Expression + ): Expression { + if (nodeIsCallable(expr.kind)) { + let typeArguments: CommonTypeNode[] | null = null; + while ( + tn.skip(Token.OPENPAREN) + || + nodeIsGenericCallable(expr.kind) && (typeArguments = this.tryParseTypeArgumentsBeforeArguments(tn)) !== null + ) { + let args = this.parseArguments(tn); + if (!args) break; + expr = Node.createCallExpression( // is again callable + expr, + typeArguments, + args, + tn.range(expr.range.start, tn.pos) + ); + } } return expr; } diff --git a/src/types.ts b/src/types.ts index a73310c8..dff369d4 100644 --- a/src/types.ts +++ b/src/types.ts @@ -213,7 +213,11 @@ export class Type { } else if (!target.is(TypeFlags.REFERENCE)) { if (this.is(TypeFlags.INTEGER)) { if (target.is(TypeFlags.INTEGER)) { - if (!signednessIsRelevant || this.is(TypeFlags.SIGNED) == target.is(TypeFlags.SIGNED)) { + if ( + !signednessIsRelevant || + this == Type.bool || // a bool (0 or 1) can be safely assigned to all sorts of integers + this.is(TypeFlags.SIGNED) == target.is(TypeFlags.SIGNED) + ) { return this.size <= target.size; } } else if (target.kind == TypeKind.F32) { diff --git a/std/assembly/bindings/Math.ts b/std/assembly/bindings/Math.ts new file mode 100644 index 00000000..6e387414 --- /dev/null +++ b/std/assembly/bindings/Math.ts @@ -0,0 +1,44 @@ +export declare const E: f64; +export declare const LN2: f64; +export declare const LN10: f64; +export declare const LOG2E: f64; +export declare const LOG10E: f64; +export declare const PI: f64; +export declare const SQRT1_2: f64; +export declare const SQRT2: f64; + +export declare function abs(x: f64): f64; +export declare function acos(x: f64): f64; +export declare function acosh(x: f64): f64; +export declare function asin(x: f64): f64; +export declare function asinh(x: f64): f64; +export declare function atan(x: f64): f64; +export declare function atan2(y: f64, x: f64): f64; +export declare function atanh(x: f64): f64; +export declare function cbrt(x: f64): f64; +export declare function ceil(x: f64): f64; +export declare function clz32(x: f64): f64; +export declare function cos(x: f64): f64; +export declare function cosh(x: f64): f64; +export declare function exp(x: f64): f64; +export declare function expm1(x: f64): f64; +export declare function floor(x: f64): f64; +export declare function fround(x: f64): f32; +export declare function hypot(value1: f64, value2: f64): f64; // TODO: rest +export declare function imul(a: f64, b: f64): f64; +export declare function log(x: f64): f64; +export declare function log10(x: f64): f64; +export declare function log1p(x: f64): f64; +export declare function log2(x: f64): f64; +export declare function max(value1: f64, value2: f64): f64; // TODO: rest +export declare function min(value1: f64, value2: f64): f64; // TODO: rest +export declare function pow(base: f64, exponent: f64): f64; +export declare function random(): f64; +export declare function round(x: f64): f64; +export declare function sign(x: f64): f64; +export declare function sin(x: f64): f64; +export declare function sinh(x: f64): f64; +export declare function sqrt(x: f64): f64; +export declare function tan(x: f64): f64; +export declare function tanh(x: f64): f64; +export declare function trunc(x: f64): f64; diff --git a/std/assembly/math.ts b/std/assembly/math.ts index 112b7887..40e0d644 100644 --- a/std/assembly/math.ts +++ b/std/assembly/math.ts @@ -1,50 +1,5 @@ -export declare namespace JSMath { - - export const E: f64; - export const LN2: f64; - export const LN10: f64; - export const LOG2E: f64; - export const LOG10E: f64; - export const PI: f64; - export const SQRT1_2: f64; - export const SQRT2: f64; - - export function abs(x: f64): f64; - export function acos(x: f64): f64; - export function acosh(x: f64): f64; - export function asin(x: f64): f64; - export function asinh(x: f64): f64; - export function atan(x: f64): f64; - export function atan2(y: f64, x: f64): f64; - export function atanh(x: f64): f64; - export function cbrt(x: f64): f64; - export function ceil(x: f64): f64; - export function clz32(x: f64): f64; - export function cos(x: f64): f64; - export function cosh(x: f64): f64; - export function exp(x: f64): f64; - export function expm1(x: f64): f64; - export function floor(x: f64): f64; - export function fround(x: f64): f32; - export function hypot(value1: f64, value2: f64): f64; // TODO: rest - export function imul(a: f64, b: f64): f64; - export function log(x: f64): f64; - export function log10(x: f64): f64; - export function log1p(x: f64): f64; - export function log2(x: f64): f64; - export function max(value1: f64, value2: f64): f64; // TODO: rest - export function min(value1: f64, value2: f64): f64; // TODO: rest - export function pow(base: f64, exponent: f64): f64; - export function random(): f64; - export function round(x: f64): f64; - export function sign(x: f64): f64; - export function sin(x: f64): f64; - export function sinh(x: f64): f64; - export function sqrt(x: f64): f64; - export function tan(x: f64): f64; - export function tanh(x: f64): f64; - export function trunc(x: f64): f64; -} +import * as JSMath from "./bindings/Math"; +export { JSMath }; import { abs as builtin_abs, diff --git a/tests/compiler.js b/tests/compiler.js index d77ad7ff..d331cebb 100644 --- a/tests/compiler.js +++ b/tests/compiler.js @@ -81,7 +81,7 @@ tests.forEach(filename => { // TODO: also save stdout/stderr and diff it (-> expected failures) // Build unoptimized - asc.main( [ + asc.main([ filename, "--baseDir", basedir, "--validate", @@ -188,28 +188,26 @@ tests.forEach(filename => { externalFunction: function() { }, externalConstant: 1 }, - JSOp: { + math: { mod: function(a, b) { return a % b; } }, - JSMath: Math, + Math: Math, // tests/declare declare: { externalFunction: function() { }, - externalConstant: 1 - }, - my: { - externalFunction: function() { }, - externalConstant: 2 + externalConstant: 1, + "my.externalFunction": function() { }, + "my.externalConstant": 2 }, // tests/external external: { foo: function() {}, + "foo.bar": function() {}, bar: function() {} }, foo: { - bar: function() {}, baz: function() {}, "var": 3 } diff --git a/tests/compiler/abi.optimized.wat b/tests/compiler/abi.optimized.wat index 4f5c5429..3804e35a 100644 --- a/tests/compiler/abi.optimized.wat +++ b/tests/compiler/abi.optimized.wat @@ -2,12 +2,15 @@ (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exportedExported)) (export "exportedInternal" (func $abi/exportedInternal)) diff --git a/tests/compiler/abi.untouched.wat b/tests/compiler/abi.untouched.wat index 6140f069..c5a0a04e 100644 --- a/tests/compiler/abi.untouched.wat +++ b/tests/compiler/abi.untouched.wat @@ -2,15 +2,16 @@ (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $abi/condition (mut i32) (i32.const 0)) (global $abi/y (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 24)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\06\00\00\00a\00b\00i\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (export "exported" (func $abi/exported)) (export "exportedExported" (func $abi/exportedExported)) (export "exportedInternal" (func $abi/exportedInternal)) diff --git a/tests/compiler/asc-constants.optimized.wat b/tests/compiler/asc-constants.optimized.wat index 941ac1ce..d475aaf8 100644 --- a/tests/compiler/asc-constants.optimized.wat +++ b/tests/compiler/asc-constants.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/asc-constants.untouched.wat b/tests/compiler/asc-constants.untouched.wat index 77b2e671..94229c4b 100644 --- a/tests/compiler/asc-constants.untouched.wat +++ b/tests/compiler/asc-constants.untouched.wat @@ -1,5 +1,8 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $ASC_TARGET i32 (i32.const 0)) (global $ASC_NO_TREESHAKING i32 (i32.const 0)) (global $ASC_NO_ASSERT i32 (i32.const 0)) @@ -9,10 +12,8 @@ (global $ASC_FEATURE_MUTABLE_GLOBAL i32 (i32.const 0)) (global $ASC_FEATURE_SIGN_EXTENSION i32 (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (drop diff --git a/tests/compiler/assert.optimized.wat b/tests/compiler/assert.optimized.wat index 26f1d0c0..157b1bec 100644 --- a/tests/compiler/assert.optimized.wat +++ b/tests/compiler/assert.optimized.wat @@ -3,7 +3,10 @@ (memory $0 1) (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s") (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e") + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/assert.untouched.wat b/tests/compiler/assert.untouched.wat index 05aff3d9..f7c52a10 100644 --- a/tests/compiler/assert.untouched.wat +++ b/tests/compiler/assert.untouched.wat @@ -1,14 +1,15 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 60)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00") (data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 60)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/binary.optimized.wat b/tests/compiler/binary.optimized.wat index 982d9f4d..eb407656 100644 --- a/tests/compiler/binary.optimized.wat +++ b/tests/compiler/binary.optimized.wat @@ -2,13 +2,16 @@ (type $v (func)) (type $FUNCSIG$dd (func (param f64) (result f64))) (type $FUNCSIG$ff (func (param f32) (result f32))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $binary/b (mut i32) (i32.const 0)) (global $binary/i (mut i32) (i32.const 0)) (global $binary/I (mut i64) (i64.const 0)) (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.pow (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$dd) (param $0 f64) (result f64) (local $1 i32) diff --git a/tests/compiler/binary.untouched.wat b/tests/compiler/binary.untouched.wat index 39b82b2d..acf643a6 100644 --- a/tests/compiler/binary.untouched.wat +++ b/tests/compiler/binary.untouched.wat @@ -4,6 +4,9 @@ (type $fff (func (param f32 f32) (result f32))) (type $fif (func (param f32 i32) (result f32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $binary/b (mut i32) (i32.const 0)) (global $binary/i (mut i32) (i32.const 0)) (global $NaN f64 (f64.const nan:0x8000000000000)) @@ -11,10 +14,8 @@ (global $binary/f (mut f32) (f32.const 0)) (global $binary/F (mut f64) (f64.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/math/NativeMath.scalbn (; 0 ;) (type $FiF) (param $0 f64) (param $1 i32) (result f64) (local $2 f64) diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 6f22228a..0a6a848d 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -2,6 +2,11 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiv (func (param i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") + (data (i32.const 40) "\01\00\00\001") + (table 2 anyfunc) + (elem (i32.const 0) $builtins/test $start~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $builtins/b (mut i32) (i32.const 0)) (global $builtins/i (mut i32) (i32.const 0)) @@ -12,11 +17,6 @@ (global $builtins/U (mut i64) (i64.const 0)) (global $builtins/s (mut i32) (i32.const 0)) (global $builtins/fn (mut i32) (i32.const 1)) - (table 2 2 anyfunc) - (elem (i32.const 0) $builtins/test $start~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s") - (data (i32.const 40) "\01\00\00\001") (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $builtins/test)) diff --git a/tests/compiler/builtins.untouched.wat b/tests/compiler/builtins.untouched.wat index 6d372a89..e8a5dd92 100644 --- a/tests/compiler/builtins.untouched.wat +++ b/tests/compiler/builtins.untouched.wat @@ -2,6 +2,11 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiv (func (param i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") + (data (i32.const 40) "\01\00\00\001\00") + (table 2 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $builtins/b (mut i32) (i32.const 0)) (global $builtins/i (mut i32) (i32.const 0)) @@ -48,11 +53,6 @@ (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $~lib/builtins/f64.NaN f64 (f64.const nan:0x8000000000000)) (global $HEAP_BASE i32 (i32.const 48)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00") - (data (i32.const 40) "\01\00\00\001\00") (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $builtins/test)) diff --git a/tests/compiler/call-inferred.optimized.wat b/tests/compiler/call-inferred.optimized.wat index 60199ca5..424dd403 100644 --- a/tests/compiler/call-inferred.optimized.wat +++ b/tests/compiler/call-inferred.optimized.wat @@ -4,10 +4,13 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$d (func (result f64))) (type $FUNCSIG$f (func (result f32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $call-inferred/foo (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (i32.const 42) diff --git a/tests/compiler/call-inferred.untouched.wat b/tests/compiler/call-inferred.untouched.wat index 76384dad..601b9b61 100644 --- a/tests/compiler/call-inferred.untouched.wat +++ b/tests/compiler/call-inferred.untouched.wat @@ -4,13 +4,14 @@ (type $FF (func (param f64) (result f64))) (type $ff (func (param f32) (result f32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 44)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00i\00n\00f\00e\00r\00r\00e\00d\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 44)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $call-inferred/foo (; 1 ;) (type $ii) (param $0 i32) (result i32) (get_local $0) diff --git a/tests/compiler/call-optional.optimized.wat b/tests/compiler/call-optional.optimized.wat index 53d83588..5b1ff05d 100644 --- a/tests/compiler/call-optional.optimized.wat +++ b/tests/compiler/call-optional.optimized.wat @@ -2,13 +2,13 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") + (table 2 anyfunc) + (elem (i32.const 0) $null $call-optional/opt|trampoline) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $call-optional/opt|trampoline) - (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/call-optional.untouched.wat b/tests/compiler/call-optional.untouched.wat index c951c949..f293ecc3 100644 --- a/tests/compiler/call-optional.untouched.wat +++ b/tests/compiler/call-optional.untouched.wat @@ -2,14 +2,14 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") + (table 2 anyfunc) + (elem (i32.const 0) $null $call-optional/opt|trampoline) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~argc (mut i32) (i32.const 0)) (global $call-optional/optIndirect (mut i32) (i32.const 1)) (global $HEAP_BASE i32 (i32.const 44)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $call-optional/opt|trampoline) - (memory $0 1) - (data (i32.const 8) "\10\00\00\00c\00a\00l\00l\00-\00o\00p\00t\00i\00o\00n\00a\00l\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/class-extends.optimized.wat b/tests/compiler/class-extends.optimized.wat index eece3880..b0d9ff00 100644 --- a/tests/compiler/class-extends.optimized.wat +++ b/tests/compiler/class-extends.optimized.wat @@ -2,7 +2,10 @@ (type $iv (func (param i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-extends/test)) (func $class-extends/test (; 0 ;) (; has Stack IR ;) (type $iv) (param $0 i32) (drop diff --git a/tests/compiler/class-extends.untouched.wat b/tests/compiler/class-extends.untouched.wat index eda0c456..83cc7a30 100644 --- a/tests/compiler/class-extends.untouched.wat +++ b/tests/compiler/class-extends.untouched.wat @@ -1,11 +1,12 @@ (module (type $iv (func (param i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-extends/test)) (func $class-extends/test (; 0 ;) (type $iv) (param $0 i32) (drop diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index a70c5a33..b750b3e3 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -3,7 +3,10 @@ (type $v (func)) (type $FUNCSIG$v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-overloading/test)) (start $start) (func $class-overloading/Foo#baz (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) diff --git a/tests/compiler/class-overloading.untouched.wat b/tests/compiler/class-overloading.untouched.wat index 3588c3c6..082ac329 100644 --- a/tests/compiler/class-overloading.untouched.wat +++ b/tests/compiler/class-overloading.untouched.wat @@ -1,11 +1,12 @@ (module (type $iv (func (param i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-overloading/test)) (start $start) (func $class-overloading/Foo#baz (; 0 ;) (type $iv) (param $0 i32) diff --git a/tests/compiler/class-with-boolean-field.optimized.wat b/tests/compiler/class-with-boolean-field.optimized.wat index 00065b62..e808ac29 100644 --- a/tests/compiler/class-with-boolean-field.optimized.wat +++ b/tests/compiler/class-with-boolean-field.optimized.wat @@ -2,7 +2,10 @@ (type $i (func (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-with-boolean-field/test)) (func $class-with-boolean-field/test (; 0 ;) (; has Stack IR ;) (type $i) (result i32) (i32.store8 diff --git a/tests/compiler/class-with-boolean-field.untouched.wat b/tests/compiler/class-with-boolean-field.untouched.wat index 7a3b5d0d..98f2c9c9 100644 --- a/tests/compiler/class-with-boolean-field.untouched.wat +++ b/tests/compiler/class-with-boolean-field.untouched.wat @@ -1,11 +1,12 @@ (module (type $i (func (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class-with-boolean-field/test)) (func $class-with-boolean-field/test (; 0 ;) (type $i) (result i32) (local $0 i32) diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 7331c2db..00e30359 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -3,10 +3,13 @@ (type $v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$f (func (result f32))) - (global $class/Animal.ONE (mut i32) (i32.const 1)) (memory $0 1) (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $class/Animal.ONE (mut i32) (i32.const 1)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class/test)) (start $start) (func $class/Animal.add (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) diff --git a/tests/compiler/class.untouched.wat b/tests/compiler/class.untouched.wat index 72dbf3ad..59174a7d 100644 --- a/tests/compiler/class.untouched.wat +++ b/tests/compiler/class.untouched.wat @@ -6,14 +6,15 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $ifff (func (param i32 f32 f32) (result f32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $class/Animal.ONE (mut i32) (i32.const 1)) (global $HEAP_BASE i32 (i32.const 28)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $class/test)) (start $start) (func $class/Animal.add (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/closure.optimized.wat b/tests/compiler/closure.optimized.wat index 39428b31..b6693700 100644 --- a/tests/compiler/closure.optimized.wat +++ b/tests/compiler/closure.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (func $null (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/closure.untouched.wat b/tests/compiler/closure.untouched.wat index e1fc1aa2..2973943d 100644 --- a/tests/compiler/closure.untouched.wat +++ b/tests/compiler/closure.untouched.wat @@ -1,10 +1,11 @@ (module (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (func $null (; 0 ;) (type $v) ) ) diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 26e4fce3..84f9f4d5 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -1,12 +1,15 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (; has Stack IR ;) (type $v) (local $0 i32) diff --git a/tests/compiler/comma.untouched.wat b/tests/compiler/comma.untouched.wat index cafd7f8c..bc1e5c48 100644 --- a/tests/compiler/comma.untouched.wat +++ b/tests/compiler/comma.untouched.wat @@ -1,15 +1,16 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $comma/a (mut i32) (i32.const 0)) (global $comma/b (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 28)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/declare.optimized.wat b/tests/compiler/declare.optimized.wat index 6ac6e3fd..c3cd8226 100644 --- a/tests/compiler/declare.optimized.wat +++ b/tests/compiler/declare.optimized.wat @@ -1,14 +1,17 @@ (module (type $v (func)) (type $iiiiv (func (param i32 i32 i32 i32))) - (import "declare" "externalConstant" (global $declare/externalConstant i32)) - (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "my" "externalFunction" (func $declare/my.externalFunction)) - (import "my" "externalConstant" (global $declare/my.externalConstant i32)) (memory $0 1) (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "declare" "externalConstant" (global $declare/externalConstant i32)) + (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) + (import "declare" "externalFunction" (func $declare/externalFunction)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 3 ;) (; has Stack IR ;) (type $v) (call $declare/externalFunction) diff --git a/tests/compiler/declare.untouched.wat b/tests/compiler/declare.untouched.wat index 1ca98e41..19ccbd4b 100644 --- a/tests/compiler/declare.untouched.wat +++ b/tests/compiler/declare.untouched.wat @@ -1,17 +1,18 @@ (module (type $v (func)) (type $iiiiv (func (param i32 i32 i32 i32))) - (import "declare" "externalConstant" (global $declare/externalConstant i32)) - (import "declare" "externalFunction" (func $declare/externalFunction)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "my" "externalFunction" (func $declare/my.externalFunction)) - (import "my" "externalConstant" (global $declare/my.externalConstant i32)) - (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "declare" "externalConstant" (global $declare/externalConstant i32)) + (import "declare" "my.externalConstant" (global $declare/my.externalConstant i32)) + (import "declare" "externalFunction" (func $declare/externalFunction)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "declare" "my.externalFunction" (func $declare/my.externalFunction)) + (global $HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 3 ;) (type $v) (call $declare/externalFunction) diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index 0170d871..4043ba03 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,13 +1,16 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (; has Stack IR ;) (type $v) (local $0 i32) diff --git a/tests/compiler/do.untouched.wat b/tests/compiler/do.untouched.wat index 7e3a8369..55c07c05 100644 --- a/tests/compiler/do.untouched.wat +++ b/tests/compiler/do.untouched.wat @@ -1,16 +1,17 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $do/n (mut i32) (i32.const 10)) (global $do/m (mut i32) (i32.const 0)) (global $do/o (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 24)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index 39428b31..b6693700 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (func $null (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/empty.untouched.wat b/tests/compiler/empty.untouched.wat index e1fc1aa2..2973943d 100644 --- a/tests/compiler/empty.untouched.wat +++ b/tests/compiler/empty.untouched.wat @@ -1,10 +1,11 @@ (module (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (func $null (; 0 ;) (type $v) ) ) diff --git a/tests/compiler/enum.optimized.wat b/tests/compiler/enum.optimized.wat index e0f438d1..7a93a9eb 100644 --- a/tests/compiler/enum.optimized.wat +++ b/tests/compiler/enum.optimized.wat @@ -1,6 +1,9 @@ (module (type $i (func (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $enum/Implicit.ZERO i32 (i32.const 0)) (global $enum/Implicit.ONE i32 (i32.const 1)) (global $enum/Implicit.TWO i32 (i32.const 2)) @@ -17,8 +20,8 @@ (global $enum/NonConstant.ONE (mut i32) (i32.const 0)) (global $enum/SelfReference.ZERO i32 (i32.const 0)) (global $enum/SelfReference.ONE i32 (i32.const 1)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/enum.untouched.wat b/tests/compiler/enum.untouched.wat index b96869cc..b86e0ffe 100644 --- a/tests/compiler/enum.untouched.wat +++ b/tests/compiler/enum.untouched.wat @@ -1,6 +1,9 @@ (module (type $i (func (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $enum/Implicit.ZERO i32 (i32.const 0)) (global $enum/Implicit.ONE i32 (i32.const 1)) (global $enum/Implicit.TWO i32 (i32.const 2)) @@ -19,10 +22,8 @@ (global $enum/SelfReference.ONE i32 (i32.const 1)) (global $enum/enumType (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "Implicit.ZERO" (global $enum/Implicit.ZERO)) (export "Implicit.ONE" (global $enum/Implicit.ONE)) (export "Implicit.TWO" (global $enum/Implicit.TWO)) diff --git a/tests/compiler/export.optimized.wat b/tests/compiler/export.optimized.wat index 51f54308..364c84ee 100644 --- a/tests/compiler/export.optimized.wat +++ b/tests/compiler/export.optimized.wat @@ -1,11 +1,14 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $export/ns.two) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/export.untouched.wat b/tests/compiler/export.untouched.wat index 4dc03d7c..a54727a9 100644 --- a/tests/compiler/export.untouched.wat +++ b/tests/compiler/export.untouched.wat @@ -1,14 +1,15 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $export/add)) (export "sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index e457b373..e945c1fe 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -6,6 +6,9 @@ (type $iv (func (param i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $exports/Animal.CAT i32 (i32.const 0)) @@ -16,8 +19,8 @@ (global $exports/vehicles.Car.TIRES i32 (i32.const 4)) (global $exports/outer.inner.a i32 (i32.const 42)) (global $~argc (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $exports/add)) (export "_setargc" (func $~setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) diff --git a/tests/compiler/exports.untouched.wat b/tests/compiler/exports.untouched.wat index 82b0d28d..dfff9161 100644 --- a/tests/compiler/exports.untouched.wat +++ b/tests/compiler/exports.untouched.wat @@ -5,6 +5,9 @@ (type $iiv (func (param i32 i32))) (type $iv (func (param i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -20,10 +23,8 @@ (global $exports/outer.inner.a i32 (i32.const 42)) (global $HEAP_BASE i32 (i32.const 8)) (global $~argc (mut i32) (i32.const 0)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $exports/add)) (export "_setargc" (func $~setargc)) (export "subOpt" (func $exports/subOpt|trampoline)) diff --git a/tests/compiler/external.optimized.wat b/tests/compiler/external.optimized.wat index fb98572f..534c6bda 100644 --- a/tests/compiler/external.optimized.wat +++ b/tests/compiler/external.optimized.wat @@ -1,12 +1,15 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "foo" "var" (global $external/var_ i32)) (import "external" "foo" (func $external/foo)) - (import "foo" "bar" (func $external/foo.bar)) + (import "external" "foo.bar" (func $external/foo.bar)) (import "external" "bar" (func $external/two)) (import "foo" "baz" (func $external/three)) - (import "foo" "var" (global $external/var_ i32)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "foo.bar" (func $external/foo.bar)) (export "foo" (func $external/foo)) (export "two" (func $external/two)) diff --git a/tests/compiler/external.ts b/tests/compiler/external.ts index 0a0dcaaf..a45aaffd 100644 --- a/tests/compiler/external.ts +++ b/tests/compiler/external.ts @@ -1,13 +1,13 @@ -export declare function foo(): void; // external.foo +export declare function foo(): void; // external , foo export declare namespace foo { - export function bar(): void; // foo.bar + export function bar(): void; // external , foo.bar } @external("bar") -export declare function two(): void; // external.bar +export declare function two(): void; // external , bar @external("foo", "baz") -export declare function three(): void; // foo.baz +export declare function three(): void; // foo , baz -@external("foo", "var") +@external("foo", "var") // foo , var export declare const var_: i32; diff --git a/tests/compiler/external.untouched.wat b/tests/compiler/external.untouched.wat index 3e88f4e1..6d108a95 100644 --- a/tests/compiler/external.untouched.wat +++ b/tests/compiler/external.untouched.wat @@ -1,15 +1,16 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "foo" "var" (global $external/var_ i32)) (import "external" "foo" (func $external/foo)) - (import "foo" "bar" (func $external/foo.bar)) + (import "external" "foo.bar" (func $external/foo.bar)) (import "external" "bar" (func $external/two)) (import "foo" "baz" (func $external/three)) - (import "foo" "var" (global $external/var_ i32)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "foo.bar" (func $external/foo.bar)) (export "foo" (func $external/foo)) (export "two" (func $external/two)) diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index ef4fb7dc..bfee54e7 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,11 +1,14 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $for/i (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $for/i (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (; has Stack IR ;) (type $v) (local $0 i32) diff --git a/tests/compiler/for.untouched.wat b/tests/compiler/for.untouched.wat index dd0bb0aa..aa0c932d 100644 --- a/tests/compiler/for.untouched.wat +++ b/tests/compiler/for.untouched.wat @@ -1,14 +1,15 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $for/i (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 24)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index c41c772a..50469211 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -3,16 +3,16 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $i (func (result i32))) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") + (table 5 anyfunc) + (elem (i32.const 0) $start~someName|3 $start~anonymous|1 $start~anonymous|1 $start~someName|3 $start~anonymous|4) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $function-expression/f1 (mut i32) (i32.const 1)) (global $~argc (mut i32) (i32.const 0)) (global $function-expression/f2 (mut i32) (i32.const 2)) (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) - (table 5 5 anyfunc) - (elem (i32.const 0) $start~someName|3 $start~anonymous|1 $start~anonymous|1 $start~someName|3 $start~anonymous|4) - (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/function-expression.untouched.wat b/tests/compiler/function-expression.untouched.wat index efc8ea7b..cd8cd4fd 100644 --- a/tests/compiler/function-expression.untouched.wat +++ b/tests/compiler/function-expression.untouched.wat @@ -3,6 +3,10 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $i (func (result i32))) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") + (table 5 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~someName|3 $start~anonymous|4) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $function-expression/f1 (mut i32) (i32.const 1)) (global $~argc (mut i32) (i32.const 0)) @@ -10,10 +14,6 @@ (global $function-expression/f3 (mut i32) (i32.const 3)) (global $function-expression/f4 (mut i32) (i32.const 4)) (global $HEAP_BASE i32 (i32.const 56)) - (table 5 5 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~someName|3 $start~anonymous|4) - (memory $0 1) - (data (i32.const 8) "\16\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00e\00x\00p\00r\00e\00s\00s\00i\00o\00n\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/function-types.optimized.wat b/tests/compiler/function-types.optimized.wat index e04d4d96..e63745f6 100644 --- a/tests/compiler/function-types.optimized.wat +++ b/tests/compiler/function-types.optimized.wat @@ -7,14 +7,14 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") + (table 5 anyfunc) + (elem (i32.const 0) $null $function-types/makeAdder~anonymous|1 $function-types/makeAdder~anonymous|2 $function-types/makeAdder~anonymous|3 $function-types/makeAdder~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) - (table 5 5 anyfunc) - (elem (i32.const 0) $null $function-types/makeAdder~anonymous|1 $function-types/makeAdder~anonymous|2 $function-types/makeAdder~anonymous|3 $function-types/makeAdder~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/function-types.untouched.wat b/tests/compiler/function-types.untouched.wat index 82e8d6bf..f0702c72 100644 --- a/tests/compiler/function-types.untouched.wat +++ b/tests/compiler/function-types.untouched.wat @@ -6,15 +6,15 @@ (type $FFF (func (param f64 f64) (result f64))) (type $iiii (func (param i32 i32 i32) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") + (table 5 anyfunc) + (elem (i32.const 0) $null $function-types/makeAdder~anonymous|1 $function-types/makeAdder~anonymous|2 $function-types/makeAdder~anonymous|3 $function-types/addI32) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $function-types/i32Adder (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) (global $function-types/i64Adder (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 48)) - (table 5 5 anyfunc) - (elem (i32.const 0) $null $function-types/makeAdder~anonymous|1 $function-types/makeAdder~anonymous|2 $function-types/makeAdder~anonymous|3 $function-types/addI32) - (memory $0 1) - (data (i32.const 8) "\11\00\00\00f\00u\00n\00c\00t\00i\00o\00n\00-\00t\00y\00p\00e\00s\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/function.optimized.wat b/tests/compiler/function.optimized.wat index 757cfef9..983014f5 100644 --- a/tests/compiler/function.optimized.wat +++ b/tests/compiler/function.optimized.wat @@ -10,7 +10,10 @@ (type $FUNCSIG$f (func (result f32))) (type $FUNCSIG$d (func (result f64))) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $function/v) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $function/v (; 0 ;) (; has Stack IR ;) (type $v) (nop) diff --git a/tests/compiler/function.untouched.wat b/tests/compiler/function.untouched.wat index 2775f86a..598a89d7 100644 --- a/tests/compiler/function.untouched.wat +++ b/tests/compiler/function.untouched.wat @@ -14,11 +14,12 @@ (type $IiI (func (param i64 i32) (result i64))) (type $fff (func (param f32 f32) (result f32))) (type $FFF (func (param f64 f64) (result f64))) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $function/v (; 0 ;) (type $v) (nop) diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index 0524f7a0..4f43d719 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -3,12 +3,12 @@ (type $ii (func (param i32) (result i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 2 anyfunc) + (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1) - (memory $0 0) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $getter-call/test)) diff --git a/tests/compiler/getter-call.untouched.wat b/tests/compiler/getter-call.untouched.wat index 7e622dff..498fa49f 100644 --- a/tests/compiler/getter-call.untouched.wat +++ b/tests/compiler/getter-call.untouched.wat @@ -2,6 +2,9 @@ (type $i (func (result i32))) (type $ii (func (param i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 2 anyfunc) + (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -10,9 +13,6 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $getter-call/C#get:x~anonymous|1) - (memory $0 0) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $getter-call/test)) diff --git a/tests/compiler/getter-setter.optimized.wat b/tests/compiler/getter-setter.optimized.wat index 1a7cce76..51b80f9d 100644 --- a/tests/compiler/getter-setter.optimized.wat +++ b/tests/compiler/getter-setter.optimized.wat @@ -3,11 +3,14 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iv (func (param i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $getter-setter/Foo.get:bar (; 1 ;) (; has Stack IR ;) (type $i) (result i32) (get_global $getter-setter/Foo._bar) diff --git a/tests/compiler/getter-setter.untouched.wat b/tests/compiler/getter-setter.untouched.wat index 2d55d8f6..08369dc9 100644 --- a/tests/compiler/getter-setter.untouched.wat +++ b/tests/compiler/getter-setter.untouched.wat @@ -3,14 +3,15 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iv (func (param i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $getter-setter/Foo._bar (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 44)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32) (get_global $getter-setter/Foo._bar) diff --git a/tests/compiler/i64-polyfill.optimized.wat b/tests/compiler/i64-polyfill.optimized.wat index 9857eb11..d6f1c432 100644 --- a/tests/compiler/i64-polyfill.optimized.wat +++ b/tests/compiler/i64-polyfill.optimized.wat @@ -3,10 +3,13 @@ (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/i64-polyfill.untouched.wat b/tests/compiler/i64-polyfill.untouched.wat index 67660dd8..232c1f6c 100644 --- a/tests/compiler/i64-polyfill.untouched.wat +++ b/tests/compiler/i64-polyfill.untouched.wat @@ -3,15 +3,16 @@ (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $../../examples/i64-polyfill/assembly/i64/lo (mut i32) (i32.const 0)) (global $../../examples/i64-polyfill/assembly/i64/hi (mut i32) (i32.const 0)) (global $NaN f64 (f64.const nan:0x8000000000000)) (global $Infinity f64 (f64.const inf)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getHi" (func $../../examples/i64-polyfill/assembly/i64/getHi)) (export "getLo" (func $../../examples/i64-polyfill/assembly/i64/getLo)) (export "clz" (func $../../examples/i64-polyfill/assembly/i64/clz)) diff --git a/tests/compiler/if.optimized.wat b/tests/compiler/if.optimized.wat index 0067522b..2004c7ab 100644 --- a/tests/compiler/if.optimized.wat +++ b/tests/compiler/if.optimized.wat @@ -2,10 +2,13 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElse)) diff --git a/tests/compiler/if.untouched.wat b/tests/compiler/if.untouched.wat index b074f3e3..18559ab4 100644 --- a/tests/compiler/if.untouched.wat +++ b/tests/compiler/if.untouched.wat @@ -2,13 +2,14 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 24)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 24)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "ifThenElse" (func $if/ifThenElse)) (export "ifThen" (func $if/ifThen)) (export "ifThenElseBlock" (func $if/ifThenElseBlock)) diff --git a/tests/compiler/import.optimized.wat b/tests/compiler/import.optimized.wat index 32115ef8..27327ffa 100644 --- a/tests/compiler/import.optimized.wat +++ b/tests/compiler/import.optimized.wat @@ -2,7 +2,10 @@ (type $v (func)) (type $FUNCSIG$i (func (result i32))) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $export/ns.two) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $export/add (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (i32.const 3) @@ -14,24 +17,26 @@ (nop) ) (func $start (; 3 ;) (; has Stack IR ;) (type $v) + (local $0 i32) + (local $1 i32) + (set_local $0 + (call $export/add) + ) + (set_local $1 + (call $export/sub) + ) (drop - (i32.add - (i32.add - (call $export/add) - (call $export/sub) - ) - (call $export/add) - ) + (call $export/add) ) (call $export/ns.two) + (set_local $0 + (call $export/add) + ) + (set_local $1 + (call $export/sub) + ) (drop - (i32.add - (i32.add - (call $export/add) - (call $export/sub) - ) - (call $export/add) - ) + (call $export/add) ) (call $export/ns.two) ) diff --git a/tests/compiler/import.untouched.wat b/tests/compiler/import.untouched.wat index 71221c0b..eeb2b777 100644 --- a/tests/compiler/import.untouched.wat +++ b/tests/compiler/import.untouched.wat @@ -1,14 +1,15 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (i32.add diff --git a/tests/compiler/infer-type.optimized.wat b/tests/compiler/infer-type.optimized.wat index 84ecbce9..b1cba23a 100644 --- a/tests/compiler/infer-type.optimized.wat +++ b/tests/compiler/infer-type.optimized.wat @@ -4,13 +4,16 @@ (type $I (func (result i64))) (type $f (func (result f32))) (type $F (func (result f64))) + (memory $0 1) + (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $infer-type/locals) (global $infer-type/ri (mut i32) (i32.const 0)) (global $infer-type/rI (mut i64) (i64.const 0)) (global $infer-type/rf (mut f32) (f32.const 0)) (global $infer-type/rF (mut f64) (f64.const 0)) - (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $infer-type/locals (; 0 ;) (; has Stack IR ;) (type $v) (nop) diff --git a/tests/compiler/infer-type.untouched.wat b/tests/compiler/infer-type.untouched.wat index 104ec522..201724e5 100644 --- a/tests/compiler/infer-type.untouched.wat +++ b/tests/compiler/infer-type.untouched.wat @@ -5,6 +5,10 @@ (type $f (func (result f32))) (type $F (func (result f64))) (type $iiiiv (func (param i32 i32 i32 i32))) + (memory $0 1) + (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $infer-type/i i32 (i32.const 10)) (global $infer-type/I i64 (i64.const 4294967296)) @@ -16,11 +20,8 @@ (global $infer-type/inferi (mut i32) (i32.const -2147483648)) (global $infer-type/inferu (mut i32) (i32.const 2147483647)) (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00f\00e\00r\00-\00t\00y\00p\00e\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $infer-type/locals (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/inlining-recursive.optimized.wat b/tests/compiler/inlining-recursive.optimized.wat index 2b40b68b..07323dd0 100644 --- a/tests/compiler/inlining-recursive.optimized.wat +++ b/tests/compiler/inlining-recursive.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/bar)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining-recursive.untouched.wat b/tests/compiler/inlining-recursive.untouched.wat index 27ebf66f..d844dec3 100644 --- a/tests/compiler/inlining-recursive.untouched.wat +++ b/tests/compiler/inlining-recursive.untouched.wat @@ -1,10 +1,11 @@ (module (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "foo" (func $inlining-recursive/foo)) (export "bar" (func $inlining-recursive/bar)) (export "baz" (func $inlining-recursive/baz)) diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index 5fcea4cd..a8ce57a6 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -3,12 +3,12 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $ii (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~argc (mut i32) (i32.const 0)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $inlining/test_funcs~anonymous|1) (memory $0 1) (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s") + (table 2 anyfunc) + (elem (i32.const 0) $null $inlining/test_funcs~anonymous|1) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~argc (mut i32) (i32.const 0)) (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $inlining/test)) diff --git a/tests/compiler/inlining.untouched.wat b/tests/compiler/inlining.untouched.wat index 1df68205..45771c68 100644 --- a/tests/compiler/inlining.untouched.wat +++ b/tests/compiler/inlining.untouched.wat @@ -3,14 +3,14 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $ii (func (param i32) (result i32))) + (memory $0 1) + (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") + (table 2 anyfunc) + (elem (i32.const 0) $null $inlining/test_funcs~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $inlining/constantGlobal i32 (i32.const 1)) (global $~argc (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 36)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $inlining/test_funcs~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (export "test" (func $inlining/test)) diff --git a/tests/compiler/instanceof.optimized.wat b/tests/compiler/instanceof.optimized.wat index b562e352..dac7ab60 100644 --- a/tests/compiler/instanceof.optimized.wat +++ b/tests/compiler/instanceof.optimized.wat @@ -2,11 +2,14 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $instanceof/an (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $instanceof/an (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $instanceof/isI32 (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (i32.const 1) diff --git a/tests/compiler/instanceof.untouched.wat b/tests/compiler/instanceof.untouched.wat index f431919a..26bb1709 100644 --- a/tests/compiler/instanceof.untouched.wat +++ b/tests/compiler/instanceof.untouched.wat @@ -3,6 +3,10 @@ (type $ii (func (param i32) (result i32))) (type $Fi (func (param f64) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $instanceof/a (mut i32) (i32.const 0)) (global $instanceof/b (mut i32) (i32.const 0)) @@ -10,11 +14,8 @@ (global $instanceof/f (mut f32) (f32.const 0)) (global $instanceof/an (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0d\00\00\00i\00n\00s\00t\00a\00n\00c\00e\00o\00f\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $instanceof/isI32 (; 1 ;) (type $ii) (param $0 i32) (result i32) (return diff --git a/tests/compiler/limits.optimized.wat b/tests/compiler/limits.optimized.wat index 941ac1ce..d475aaf8 100644 --- a/tests/compiler/limits.optimized.wat +++ b/tests/compiler/limits.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/limits.untouched.wat b/tests/compiler/limits.untouched.wat index 25ea77cc..fb30d25c 100644 --- a/tests/compiler/limits.untouched.wat +++ b/tests/compiler/limits.untouched.wat @@ -1,5 +1,8 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) (global $~lib/builtins/i16.MIN_VALUE i32 (i32.const -32768)) @@ -27,10 +30,8 @@ (global $~lib/builtins/f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991)) (global $~lib/builtins/f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (drop diff --git a/tests/compiler/literals.optimized.wat b/tests/compiler/literals.optimized.wat index 941ac1ce..d475aaf8 100644 --- a/tests/compiler/literals.optimized.wat +++ b/tests/compiler/literals.optimized.wat @@ -1,7 +1,10 @@ (module (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/literals.untouched.wat b/tests/compiler/literals.untouched.wat index bdb5dc7e..4c96434d 100644 --- a/tests/compiler/literals.untouched.wat +++ b/tests/compiler/literals.untouched.wat @@ -1,10 +1,11 @@ (module (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (drop diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index f6c2a63e..ca1f6e6f 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1,14 +1,17 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) - (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (; has Stack IR ;) (type $v) (set_global $logical/i diff --git a/tests/compiler/logical.untouched.wat b/tests/compiler/logical.untouched.wat index 6272083e..22afa962 100644 --- a/tests/compiler/logical.untouched.wat +++ b/tests/compiler/logical.untouched.wat @@ -1,17 +1,18 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $logical/i (mut i32) (i32.const 0)) (global $logical/I (mut i64) (i64.const 0)) (global $logical/f (mut f32) (f32.const 0)) (global $logical/F (mut f64) (f64.const 0)) (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/main.optimized.wat b/tests/compiler/main.optimized.wat index 80c36433..d98f5305 100644 --- a/tests/compiler/main.optimized.wat +++ b/tests/compiler/main.optimized.wat @@ -1,10 +1,13 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "main" (func $main/main)) (func $main/main (; 0 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if diff --git a/tests/compiler/main.untouched.wat b/tests/compiler/main.untouched.wat index 6a58f902..e8d78b22 100644 --- a/tests/compiler/main.untouched.wat +++ b/tests/compiler/main.untouched.wat @@ -1,13 +1,14 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $main/code (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "main" (func $main/main)) (func $main/main (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (if diff --git a/tests/compiler/mandelbrot.optimized.wat b/tests/compiler/mandelbrot.optimized.wat index 82542531..d5ada3f7 100644 --- a/tests/compiler/mandelbrot.optimized.wat +++ b/tests/compiler/mandelbrot.optimized.wat @@ -5,7 +5,10 @@ (type $v (func)) (type $FUNCSIG$dd (func (param f64) (result f64))) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (; has Stack IR ;) (type $FF) (param $0 f64) (result f64) (local $1 i32) @@ -487,6 +490,55 @@ (br $repeat|2) ) ) + (set_local $2 + (if (result i32) + (call $~lib/builtins/isFinite + (tee_local $6 + (f64.div + (call $~lib/math/NativeMath.log + (call $~lib/math/NativeMath.log + (f64.sqrt + (f64.add + (f64.mul + (get_local $4) + (get_local $4) + ) + (f64.mul + (get_local $5) + (get_local $5) + ) + ) + ) + ) + ) + (f64.const 0.6931471805599453) + ) + ) + ) + (i32.trunc_u/f64 + (f64.mul + (f64.const 2047) + (call $../../examples/mandelbrot/assembly/index/clamp + (f64.div + (f64.sub + (f64.convert_u/i32 + (i32.add + (get_local $2) + (i32.const 1) + ) + ) + (get_local $6) + ) + (f64.convert_u/i32 + (get_local $3) + ) + ) + ) + ) + ) + (i32.const 2047) + ) + ) (i32.store16 (i32.shl (i32.add @@ -498,55 +550,7 @@ ) (i32.const 1) ) - (tee_local $2 - (if (result i32) - (call $~lib/builtins/isFinite - (tee_local $6 - (f64.div - (call $~lib/math/NativeMath.log - (call $~lib/math/NativeMath.log - (f64.sqrt - (f64.add - (f64.mul - (get_local $4) - (get_local $4) - ) - (f64.mul - (get_local $5) - (get_local $5) - ) - ) - ) - ) - ) - (f64.const 0.6931471805599453) - ) - ) - ) - (i32.trunc_u/f64 - (f64.mul - (f64.const 2047) - (call $../../examples/mandelbrot/assembly/index/clamp - (f64.div - (f64.sub - (f64.convert_u/i32 - (i32.add - (get_local $2) - (i32.const 1) - ) - ) - (get_local $6) - ) - (f64.convert_u/i32 - (get_local $3) - ) - ) - ) - ) - ) - (i32.const 2047) - ) - ) + (get_local $2) ) (set_local $7 (i32.add diff --git a/tests/compiler/mandelbrot.untouched.wat b/tests/compiler/mandelbrot.untouched.wat index dfce2403..5c69e48d 100644 --- a/tests/compiler/mandelbrot.untouched.wat +++ b/tests/compiler/mandelbrot.untouched.wat @@ -4,13 +4,14 @@ (type $Fi (func (param f64) (result i32))) (type $FFFF (func (param f64 f64 f64) (result f64))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $../../examples/mandelbrot/assembly/index/NUM_COLORS i32 (i32.const 2048)) (global $~lib/math/NativeMath.LN2 f64 (f64.const 0.6931471805599453)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "computeLine" (func $../../examples/mandelbrot/assembly/index/computeLine)) (func $~lib/math/NativeMath.log (; 0 ;) (type $FF) (param $0 f64) (result f64) (local $1 i64) diff --git a/tests/compiler/many-locals.optimized.wat b/tests/compiler/many-locals.optimized.wat index c7a9bcee..c22ec7c8 100644 --- a/tests/compiler/many-locals.optimized.wat +++ b/tests/compiler/many-locals.optimized.wat @@ -2,10 +2,13 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (start $start) diff --git a/tests/compiler/many-locals.untouched.wat b/tests/compiler/many-locals.untouched.wat index fadfab14..c006b218 100644 --- a/tests/compiler/many-locals.untouched.wat +++ b/tests/compiler/many-locals.untouched.wat @@ -2,13 +2,14 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\0e\00\00\00m\00a\00n\00y\00-\00l\00o\00c\00a\00l\00s\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 40)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "testI32" (func $many-locals/testI32)) (export "testI8" (func $many-locals/testI8)) (start $start) diff --git a/tests/compiler/memcpy.optimized.wat b/tests/compiler/memcpy.optimized.wat index bbc8be9c..7ffeaeb4 100644 --- a/tests/compiler/memcpy.optimized.wat +++ b/tests/compiler/memcpy.optimized.wat @@ -2,11 +2,14 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $memcpy/dest (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $memcpy/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/tests/compiler/memcpy.untouched.wat b/tests/compiler/memcpy.untouched.wat index 6dc6ce68..55749c02 100644 --- a/tests/compiler/memcpy.untouched.wat +++ b/tests/compiler/memcpy.untouched.wat @@ -2,15 +2,16 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $memcpy/base i32 (i32.const 8)) (global $memcpy/dest (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (export "memcpy" (func $memcpy/memcpy)) (start $start) (func $memcpy/memcpy (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) diff --git a/tests/compiler/memmove.optimized.wat b/tests/compiler/memmove.optimized.wat index eb656242..6bceeaa0 100644 --- a/tests/compiler/memmove.optimized.wat +++ b/tests/compiler/memmove.optimized.wat @@ -2,11 +2,14 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $memmove/dest (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $memmove/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/memmove.untouched.wat b/tests/compiler/memmove.untouched.wat index 686efb33..630285d6 100644 --- a/tests/compiler/memmove.untouched.wat +++ b/tests/compiler/memmove.untouched.wat @@ -2,15 +2,16 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $memmove/base i32 (i32.const 8)) (global $memmove/dest (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $memmove/memmove (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/memset.optimized.wat b/tests/compiler/memset.optimized.wat index 5f230e43..21f5a1cc 100644 --- a/tests/compiler/memset.optimized.wat +++ b/tests/compiler/memset.optimized.wat @@ -2,11 +2,14 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $memset/dest (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $memset/dest (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/memset.untouched.wat b/tests/compiler/memset.untouched.wat index eb5a99fb..615943ea 100644 --- a/tests/compiler/memset.untouched.wat +++ b/tests/compiler/memset.untouched.wat @@ -2,14 +2,15 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $memset/dest (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $memset/memset (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) diff --git a/tests/compiler/named-export-default.optimized.wat b/tests/compiler/named-export-default.optimized.wat index 092989b9..4713e582 100644 --- a/tests/compiler/named-export-default.optimized.wat +++ b/tests/compiler/named-export-default.optimized.wat @@ -2,7 +2,10 @@ (type $i (func (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (; has Stack IR ;) (type $i) (result i32) (i32.const 3) diff --git a/tests/compiler/named-export-default.untouched.wat b/tests/compiler/named-export-default.untouched.wat index 11e00889..0bb518db 100644 --- a/tests/compiler/named-export-default.untouched.wat +++ b/tests/compiler/named-export-default.untouched.wat @@ -1,11 +1,12 @@ (module (type $i (func (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "default" (func $named-export-default/get3)) (func $named-export-default/get3 (; 0 ;) (type $i) (result i32) (i32.const 3) diff --git a/tests/compiler/named-import-default.optimized.wat b/tests/compiler/named-import-default.optimized.wat index 0c9998a5..e1d2c8ae 100644 --- a/tests/compiler/named-import-default.optimized.wat +++ b/tests/compiler/named-import-default.optimized.wat @@ -2,7 +2,10 @@ (type $i (func (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getValue" (func $named-import-default/getValue)) (func $named-export-default/get3 (; 0 ;) (; has Stack IR ;) (type $i) (result i32) (i32.const 3) diff --git a/tests/compiler/named-import-default.untouched.wat b/tests/compiler/named-import-default.untouched.wat index da8b5d31..2193b8a8 100644 --- a/tests/compiler/named-import-default.untouched.wat +++ b/tests/compiler/named-import-default.untouched.wat @@ -1,11 +1,12 @@ (module (type $i (func (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getValue" (func $named-import-default/getValue)) (func $named-export-default/get3 (; 0 ;) (type $i) (result i32) (i32.const 3) diff --git a/tests/compiler/namespace.optimized.wat b/tests/compiler/namespace.optimized.wat index 1e699cba..89e0ef16 100644 --- a/tests/compiler/namespace.optimized.wat +++ b/tests/compiler/namespace.optimized.wat @@ -1,9 +1,12 @@ (module (type $i (func (result i32))) (type $v (func)) - (global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $namespace/Outer.Inner.aFunc (; 0 ;) (; has Stack IR ;) (type $i) (result i32) (get_global $namespace/Outer.Inner.aVar) diff --git a/tests/compiler/namespace.untouched.wat b/tests/compiler/namespace.untouched.wat index 9766b5e3..da9501f5 100644 --- a/tests/compiler/namespace.untouched.wat +++ b/tests/compiler/namespace.untouched.wat @@ -1,15 +1,16 @@ (module (type $i (func (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0)) (global $namespace/Outer.Inner.anEnum.ONE i32 (i32.const 1)) (global $namespace/Outer.Inner.anEnum.TWO i32 (i32.const 2)) (global $namespace/Joined.THREE i32 (i32.const 3)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32) (get_global $namespace/Outer.Inner.aVar) diff --git a/tests/compiler/new-without-allocator.optimized.wat b/tests/compiler/new-without-allocator.optimized.wat index e0c338ca..f50152b9 100644 --- a/tests/compiler/new-without-allocator.optimized.wat +++ b/tests/compiler/new-without-allocator.optimized.wat @@ -3,7 +3,10 @@ (type $v (func)) (type $FUNCSIG$i (func (result i32))) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $new-without-allocator/test)) (func $~lib/memory/memory.allocate (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (unreachable) diff --git a/tests/compiler/new-without-allocator.untouched.wat b/tests/compiler/new-without-allocator.untouched.wat index 49f85b8b..4ef88a02 100644 --- a/tests/compiler/new-without-allocator.untouched.wat +++ b/tests/compiler/new-without-allocator.untouched.wat @@ -2,11 +2,12 @@ (type $i (func (result i32))) (type $ii (func (param i32) (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "test" (func $new-without-allocator/test)) (func $~lib/memory/memory.allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (unreachable) diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 9142c7e6..33e19ce5 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -5,13 +5,16 @@ (type $v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d") (data (i32.const 40) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/object-literal.untouched.wat b/tests/compiler/object-literal.untouched.wat index d9fcb42a..b7696b87 100644 --- a/tests/compiler/object-literal.untouched.wat +++ b/tests/compiler/object-literal.untouched.wat @@ -5,6 +5,11 @@ (type $iii (func (param i32 i32) (result i32))) (type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") + (data (i32.const 40) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -14,12 +19,8 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) (global $HEAP_BASE i32 (i32.const 80)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00h\00e\00l\00l\00o\00 \00w\00o\00r\00l\00d\00") - (data (i32.const 40) "\11\00\00\00o\00b\00j\00e\00c\00t\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/overflow.optimized.wat b/tests/compiler/overflow.optimized.wat index 392e5f5d..cf816ca8 100644 --- a/tests/compiler/overflow.optimized.wat +++ b/tests/compiler/overflow.optimized.wat @@ -2,7 +2,10 @@ (type $v (func)) (memory $0 1) (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (nop) ) diff --git a/tests/compiler/overflow.untouched.wat b/tests/compiler/overflow.untouched.wat index dc59fd78..7b03ddba 100644 --- a/tests/compiler/overflow.untouched.wat +++ b/tests/compiler/overflow.untouched.wat @@ -1,13 +1,14 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 36)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\0b\00\00\00o\00v\00e\00r\00f\00l\00o\00w\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 36)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/portable-conversions.optimized.wat b/tests/compiler/portable-conversions.optimized.wat index f714e65e..7cbf5122 100644 --- a/tests/compiler/portable-conversions.optimized.wat +++ b/tests/compiler/portable-conversions.optimized.wat @@ -1,9 +1,12 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $portable-conversions/f (mut f32) (f32.const 0)) (global $portable-conversions/F (mut f64) (f64.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (drop diff --git a/tests/compiler/portable-conversions.untouched.wat b/tests/compiler/portable-conversions.untouched.wat index 50b90cdb..aa4a58c7 100644 --- a/tests/compiler/portable-conversions.untouched.wat +++ b/tests/compiler/portable-conversions.untouched.wat @@ -1,14 +1,15 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $portable-conversions/i (mut i32) (i32.const 0)) (global $portable-conversions/I (mut i64) (i64.const 0)) (global $portable-conversions/f (mut f32) (f32.const 0)) (global $portable-conversions/F (mut f64) (f64.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (drop diff --git a/tests/compiler/recursive.optimized.wat b/tests/compiler/recursive.optimized.wat index 08191d3b..5d3f5457 100644 --- a/tests/compiler/recursive.optimized.wat +++ b/tests/compiler/recursive.optimized.wat @@ -2,9 +2,13 @@ (type $ii (func (param i32) (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) + (local $1 i32) (if (i32.le_s (get_local $0) @@ -14,13 +18,15 @@ (i32.const 1) ) ) - (i32.add + (set_local $1 (call $recursive/fib (i32.sub (get_local $0) (i32.const 1) ) ) + ) + (set_local $0 (call $recursive/fib (i32.sub (get_local $0) @@ -28,6 +34,10 @@ ) ) ) + (i32.add + (get_local $1) + (get_local $0) + ) ) (func $null (; 1 ;) (; has Stack IR ;) (type $v) (nop) diff --git a/tests/compiler/recursive.untouched.wat b/tests/compiler/recursive.untouched.wat index 59a00e5c..becf4a9c 100644 --- a/tests/compiler/recursive.untouched.wat +++ b/tests/compiler/recursive.untouched.wat @@ -1,11 +1,12 @@ (module (type $ii (func (param i32) (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "fib" (func $recursive/fib)) (func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32) (if diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index 77fb6a04..c1343525 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -1,11 +1,14 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $export/ns.two) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) @@ -41,15 +44,15 @@ ) (func $start (; 4 ;) (; has Stack IR ;) (type $v) (drop - (i32.add - (call $export/add - (i32.const 1) - (i32.const 2) - ) - (call $export/mul - (i32.const 3) - (i32.const 4) - ) + (call $export/add + (i32.const 1) + (i32.const 2) + ) + ) + (drop + (call $export/mul + (i32.const 3) + (i32.const 4) ) ) ) diff --git a/tests/compiler/reexport.untouched.wat b/tests/compiler/reexport.untouched.wat index aafc7919..39609ada 100644 --- a/tests/compiler/reexport.untouched.wat +++ b/tests/compiler/reexport.untouched.wat @@ -1,14 +1,15 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "add" (func $export/add)) (export "renamed_sub" (func $export/sub)) (export "renamed_mul" (func $export/mul)) diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 11f93de6..19ec319b 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -1,10 +1,13 @@ (module (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) @@ -18,10 +21,10 @@ ) (func $start (; 2 ;) (; has Stack IR ;) (type $v) (drop - (i32.add - (call $export/add) - (call $export/mul) - ) + (call $export/add) + ) + (drop + (call $export/mul) ) ) (func $null (; 3 ;) (; has Stack IR ;) (type $v) diff --git a/tests/compiler/rereexport.untouched.wat b/tests/compiler/rereexport.untouched.wat index d1afd010..1218096f 100644 --- a/tests/compiler/rereexport.untouched.wat +++ b/tests/compiler/rereexport.untouched.wat @@ -1,14 +1,15 @@ (module (type $iii (func (param i32 i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $export/a i32 (i32.const 1)) (global $export/b i32 (i32.const 2)) (global $export/c i32 (i32.const 3)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "a" (global $export/a)) (export "renamed_a" (global $export/a)) (export "renamed_b" (global $export/b)) diff --git a/tests/compiler/retain-i32.optimized.wat b/tests/compiler/retain-i32.optimized.wat index 6cbda101..60c84255 100644 --- a/tests/compiler/retain-i32.optimized.wat +++ b/tests/compiler/retain-i32.optimized.wat @@ -2,12 +2,15 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $retain-i32/test (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$v) (nop) diff --git a/tests/compiler/retain-i32.untouched.wat b/tests/compiler/retain-i32.untouched.wat index 24385668..2d63677f 100644 --- a/tests/compiler/retain-i32.untouched.wat +++ b/tests/compiler/retain-i32.untouched.wat @@ -2,6 +2,10 @@ (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/builtins/i8.MAX_VALUE i32 (i32.const 127)) (global $~lib/builtins/i8.MIN_VALUE i32 (i32.const -128)) @@ -15,11 +19,8 @@ (global $retain-i32/si (mut i32) (i32.const 0)) (global $retain-i32/ui (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $retain-i32/test (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32) (if diff --git a/tests/compiler/scoped.optimized.wat b/tests/compiler/scoped.optimized.wat index ca8a2e68..30288148 100644 --- a/tests/compiler/scoped.optimized.wat +++ b/tests/compiler/scoped.optimized.wat @@ -2,7 +2,10 @@ (type $v (func)) (type $FUNCSIG$v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $scoped/fn (; 0 ;) (; has Stack IR ;) (type $FUNCSIG$v) (nop) diff --git a/tests/compiler/scoped.untouched.wat b/tests/compiler/scoped.untouched.wat index 2275066b..ded5ffbb 100644 --- a/tests/compiler/scoped.untouched.wat +++ b/tests/compiler/scoped.untouched.wat @@ -1,14 +1,15 @@ (module (type $iv (func (param i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $scoped/aGlobal (mut i32) (i32.const 1)) (global $scoped/aConstant i32 (i32.const 3)) (global $scoped/aStartFunctionLocal (mut i32) (i32.const 2)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $scoped/fn (; 0 ;) (type $iv) (param $0 i32) (local $1 i32) diff --git a/tests/compiler/static-this.optimized.wat b/tests/compiler/static-this.optimized.wat index 11e29c43..be72d76f 100644 --- a/tests/compiler/static-this.optimized.wat +++ b/tests/compiler/static-this.optimized.wat @@ -2,11 +2,14 @@ (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $static-this/Foo.bar (mut i32) (i32.const 42)) (memory $0 1) (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $static-this/Foo.bar (mut i32) (i32.const 42)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $static-this/Foo.getBar (; 1 ;) (; has Stack IR ;) (type $i) (result i32) (get_global $static-this/Foo.bar) diff --git a/tests/compiler/static-this.untouched.wat b/tests/compiler/static-this.untouched.wat index a94a906e..5e8158a1 100644 --- a/tests/compiler/static-this.untouched.wat +++ b/tests/compiler/static-this.untouched.wat @@ -2,14 +2,15 @@ (type $i (func (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $static-this/Foo.bar (mut i32) (i32.const 42)) (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00a\00t\00i\00c\00-\00t\00h\00i\00s\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $static-this/Foo.getBar (; 1 ;) (type $i) (result i32) (get_global $static-this/Foo.bar) diff --git a/tests/compiler/std/allocator_arena.optimized.wat b/tests/compiler/std/allocator_arena.optimized.wat index c1e9bf3f..dc5b3938 100644 --- a/tests/compiler/std/allocator_arena.optimized.wat +++ b/tests/compiler/std/allocator_arena.optimized.wat @@ -7,15 +7,18 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr1 (mut i32) (i32.const 0)) (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) diff --git a/tests/compiler/std/allocator_arena.untouched.wat b/tests/compiler/std/allocator_arena.untouched.wat index 5d6a3718..3c0f4ba7 100644 --- a/tests/compiler/std/allocator_arena.untouched.wat +++ b/tests/compiler/std/allocator_arena.untouched.wat @@ -5,6 +5,10 @@ (type $iiii (func (param i32 i32 i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -17,11 +21,8 @@ (global $std/allocator_arena/ptr2 (mut i32) (i32.const 0)) (global $std/allocator_arena/i (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 56)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\16\00\00\00s\00t\00d\00/\00a\00l\00l\00o\00c\00a\00t\00o\00r\00_\00a\00r\00e\00n\00a\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 0bd96712..e7493711 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -5,11 +5,14 @@ (type $v (func)) (type $FUNCSIG$iiiii (func (param i32 i32 i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") (data (i32.const 48) "\04\00\00\00n\00u\00l\00l") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) diff --git a/tests/compiler/std/array-access.untouched.wat b/tests/compiler/std/array-access.untouched.wat index 6ddf2457..c7ddbcb1 100644 --- a/tests/compiler/std/array-access.untouched.wat +++ b/tests/compiler/std/array-access.untouched.wat @@ -5,6 +5,12 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\00\00\00\00") + (data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 48) "\04\00\00\00n\00u\00l\00l\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -12,13 +18,8 @@ (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) (global $HEAP_BASE i32 (i32.const 60)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00") - (data (i32.const 16) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 48) "\04\00\00\00n\00u\00l\00l\00") (export "memory" (memory $0)) + (export "table" (table $0)) (export "i32ArrayArrayElementAccess" (func $std/array-access/i32ArrayArrayElementAccess)) (export "stringArrayPropertyAccess" (func $std/array-access/stringArrayPropertyAccess)) (export "stringArrayMethodCall" (func $std/array-access/stringArrayMethodCall)) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index 83ff3653..a2ae07e7 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -6,15 +6,6 @@ (type $v (func)) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) - (global $std/array-literal/i (mut i32) (i32.const 0)) - (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) - (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) - (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) - (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\03") (data (i32.const 17) "\01\02") @@ -26,7 +17,19 @@ (data (i32.const 128) "x") (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 168) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $std/array-literal/emptyArrayI32 (mut i32) (i32.const 128)) + (global $std/array-literal/i (mut i32) (i32.const 0)) + (global $std/array-literal/dynamicArrayI8 (mut i32) (i32.const 0)) + (global $std/array-literal/dynamicArrayI32 (mut i32) (i32.const 0)) + (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) + (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (tee_local $0 @@ -624,6 +627,7 @@ ) (func $start (; 13 ;) (; has Stack IR ;) (type $v) (local $0 i32) + (local $1 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 232) ) @@ -1001,31 +1005,41 @@ (unreachable) ) ) - (call $~lib/array/Array#__unchecked_set - (tee_local $0 - (call $~lib/array/Array#constructor) + (set_local $1 + (call $~lib/array/Array#constructor) + ) + (set_local $0 + (call $~lib/memory/memory.allocate + (i32.const 0) ) + ) + (call $~lib/array/Array#__unchecked_set + (get_local $1) (i32.const 0) + (get_local $0) + ) + (set_local $0 (call $~lib/memory/memory.allocate (i32.const 0) ) ) (call $~lib/array/Array#__unchecked_set - (get_local $0) + (get_local $1) (i32.const 1) + (get_local $0) + ) + (set_local $0 (call $~lib/memory/memory.allocate (i32.const 0) ) ) (call $~lib/array/Array#__unchecked_set - (get_local $0) + (get_local $1) (i32.const 2) - (call $~lib/memory/memory.allocate - (i32.const 0) - ) + (get_local $0) ) (set_global $std/array-literal/dynamicArrayRef - (get_local $0) + (get_local $1) ) (if (i32.ne @@ -1044,22 +1058,32 @@ (unreachable) ) ) + (set_local $0 + (call $~lib/array/Array#constructor) + ) + (set_local $1 + (call $std/array-literal/RefWithCtor#constructor) + ) (call $~lib/array/Array#__unchecked_set - (tee_local $0 - (call $~lib/array/Array#constructor) - ) + (get_local $0) (i32.const 0) + (get_local $1) + ) + (set_local $1 (call $std/array-literal/RefWithCtor#constructor) ) (call $~lib/array/Array#__unchecked_set (get_local $0) (i32.const 1) + (get_local $1) + ) + (set_local $1 (call $std/array-literal/RefWithCtor#constructor) ) (call $~lib/array/Array#__unchecked_set (get_local $0) (i32.const 2) - (call $std/array-literal/RefWithCtor#constructor) + (get_local $1) ) (set_global $std/array-literal/dynamicArrayRefWithCtor (get_local $0) diff --git a/tests/compiler/std/array-literal.untouched.wat b/tests/compiler/std/array-literal.untouched.wat index 55378dcb..c89f3d3c 100644 --- a/tests/compiler/std/array-literal.untouched.wat +++ b/tests/compiler/std/array-literal.untouched.wat @@ -4,6 +4,18 @@ (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\03\00\00\00\00\00\00\00\00\01\02\00\00\00\00\00") + (data (i32.const 24) "\08\00\00\00\03\00\00\00") + (data (i32.const 32) "\14\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") + (data (i32.const 80) "\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 112) "P\00\00\00\03\00\00\00") + (data (i32.const 120) "\00\00\00\00\00\00\00\00") + (data (i32.const 128) "x\00\00\00\00\00\00\00") + (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 168) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -22,19 +34,8 @@ (global $std/array-literal/dynamicArrayRef (mut i32) (i32.const 0)) (global $std/array-literal/dynamicArrayRefWithCtor (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 228)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\03\00\00\00\00\00\00\00\00\01\02\00\00\00\00\00") - (data (i32.const 24) "\08\00\00\00\03\00\00\00") - (data (i32.const 32) "\14\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00-\00l\00i\00t\00e\00r\00a\00l\00.\00t\00s\00") - (data (i32.const 80) "\0c\00\00\00\00\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 112) "P\00\00\00\03\00\00\00") - (data (i32.const 120) "\00\00\00\00\00\00\00\00") - (data (i32.const 128) "x\00\00\00\00\00\00\00") - (data (i32.const 136) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 168) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index 97416bb5..2e4bcdaa 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -32,57 +32,6 @@ (type $FUNCSIG$viii (func (param i32 i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) - (global $std/array/arr (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 120)) - (global $~argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 288)) - (global $std/array/i (mut i32) (i32.const 0)) - (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/every (mut i32) (i32.const 0)) - (global $std/array/some (mut i32) (i32.const 0)) - (global $std/array/newArr (mut i32) (i32.const 0)) - (global $std/array/filteredArr (mut i32) (i32.const 0)) - (global $std/array/boolVal (mut i32) (i32.const 0)) - (global $~lib/math/random_seeded (mut i32) (i32.const 0)) - (global $~lib/math/random_state0 (mut i64) (i64.const 0)) - (global $~lib/math/random_state1 (mut i64) (i64.const 0)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 728)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 936)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 1112)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 1192)) - (global $std/array/reversed0 (mut i32) (i32.const 1248)) - (global $std/array/reversed1 (mut i32) (i32.const 1272)) - (global $std/array/reversed2 (mut i32) (i32.const 1296)) - (global $std/array/reversed4 (mut i32) (i32.const 1336)) - (global $std/array/expected4 (mut i32) (i32.const 1376)) - (global $std/array/reversed64 (mut i32) (i32.const 0)) - (global $std/array/reversed128 (mut i32) (i32.const 0)) - (global $std/array/reversed1024 (mut i32) (i32.const 0)) - (global $std/array/reversed10000 (mut i32) (i32.const 0)) - (global $std/array/randomized512 (mut i32) (i32.const 0)) - (global $std/array/randomized64 (mut i32) (i32.const 0)) - (global $std/array/randomized257 (mut i32) (i32.const 0)) - (global $std/array/reversedNested512 (mut i32) (i32.const 0)) - (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 1536)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 1608)) - (global $std/array/randomStrings400 (mut i32) (i32.const 0)) - (global $std/array/refArr (mut i32) (i32.const 0)) - (global $std/array/subarr32 (mut i32) (i32.const 5816)) - (global $std/array/subarr8 (mut i32) (i32.const 5912)) - (global $std/array/subarrU32 (mut i32) (i32.const 5984)) - (table 56 56 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|3 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|17 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $start~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27 $start~anonymous|28 $start~anonymous|29 $start~anonymous|29 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|29 $start~anonymous|35 $start~anonymous|29 $start~anonymous|29 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|29 $start~anonymous|35 $~lib/array/Array#sort|trampoline~anonymous|43 $~lib/array/Array#sort|trampoline~anonymous|44 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|46 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|45 $start~anonymous|49 $~lib/array/Array#sort|trampoline~anonymous|45 $start~anonymous|49 $start~anonymous|52 $start~anonymous|53 $start~anonymous|54 $start~anonymous|54) (memory $0 1) (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") @@ -264,6 +213,57 @@ (data (i32.const 5960) "8\17\00\00\01") (data (i32.const 5968) "\04\00\00\00\00\00\00\00H\17") (data (i32.const 5984) "P\17\00\00\01") + (table 56 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|3 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|17 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $start~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27 $start~anonymous|28 $start~anonymous|29 $start~anonymous|29 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|29 $start~anonymous|35 $start~anonymous|29 $start~anonymous|29 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|29 $start~anonymous|35 $~lib/array/Array#sort|trampoline~anonymous|43 $~lib/array/Array#sort|trampoline~anonymous|44 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|46 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|45 $start~anonymous|49 $~lib/array/Array#sort|trampoline~anonymous|45 $start~anonymous|49 $start~anonymous|52 $start~anonymous|53 $start~anonymous|54 $start~anonymous|54) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/internal/number/_K (mut i32) (i32.const 0)) + (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $std/array/arr (mut i32) (i32.const 0)) + (global $std/array/arr8 (mut i32) (i32.const 120)) + (global $~argc (mut i32) (i32.const 0)) + (global $std/array/arr32 (mut i32) (i32.const 288)) + (global $std/array/i (mut i32) (i32.const 0)) + (global $std/array/includes (mut i32) (i32.const 0)) + (global $std/array/every (mut i32) (i32.const 0)) + (global $std/array/some (mut i32) (i32.const 0)) + (global $std/array/newArr (mut i32) (i32.const 0)) + (global $std/array/filteredArr (mut i32) (i32.const 0)) + (global $std/array/boolVal (mut i32) (i32.const 0)) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1 (mut i64) (i64.const 0)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 728)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 936)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 1112)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 1192)) + (global $std/array/reversed0 (mut i32) (i32.const 1248)) + (global $std/array/reversed1 (mut i32) (i32.const 1272)) + (global $std/array/reversed2 (mut i32) (i32.const 1296)) + (global $std/array/reversed4 (mut i32) (i32.const 1336)) + (global $std/array/expected4 (mut i32) (i32.const 1376)) + (global $std/array/reversed64 (mut i32) (i32.const 0)) + (global $std/array/reversed128 (mut i32) (i32.const 0)) + (global $std/array/reversed1024 (mut i32) (i32.const 0)) + (global $std/array/reversed10000 (mut i32) (i32.const 0)) + (global $std/array/randomized512 (mut i32) (i32.const 0)) + (global $std/array/randomized64 (mut i32) (i32.const 0)) + (global $std/array/randomized257 (mut i32) (i32.const 0)) + (global $std/array/reversedNested512 (mut i32) (i32.const 0)) + (global $std/array/reversedElements512 (mut i32) (i32.const 0)) + (global $std/array/randomStringsActual (mut i32) (i32.const 1536)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 1608)) + (global $std/array/randomStrings400 (mut i32) (i32.const 0)) + (global $std/array/refArr (mut i32) (i32.const 0)) + (global $std/array/subarr32 (mut i32) (i32.const 5816)) + (global $std/array/subarr8 (mut i32) (i32.const 5912)) + (global $std/array/subarrU32 (mut i32) (i32.const 5984)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -901,6 +901,8 @@ (func $std/array/isArraysEqual (; 10 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) (if (i32.ne (tee_local $3 @@ -933,22 +935,28 @@ (get_local $3) ) ) + (set_local $4 + (i32.and + (call $~lib/array/Array#__get + (get_local $0) + (get_local $2) + ) + (i32.const 255) + ) + ) + (set_local $5 + (i32.and + (call $~lib/array/Array#__get + (get_local $1) + (get_local $2) + ) + (i32.const 255) + ) + ) (if (i32.ne - (i32.and - (call $~lib/array/Array#__get - (get_local $0) - (get_local $2) - ) - (i32.const 255) - ) - (i32.and - (call $~lib/array/Array#__get - (get_local $1) - (get_local $2) - ) - (i32.const 255) - ) + (get_local $4) + (get_local $5) ) (return (i32.const 0) @@ -1133,6 +1141,8 @@ ) (func $std/array/isArraysEqual (; 14 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) + (local $4 i32) + (local $5 i32) (if (i32.eqz (get_local $2) @@ -1172,16 +1182,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/array/Array#__get + (get_local $0) + (get_local $3) + ) + ) + (set_local $5 + (call $~lib/array/Array#__get + (get_local $1) + (get_local $3) + ) + ) (if (i32.ne - (call $~lib/array/Array#__get - (get_local $0) - (get_local $3) - ) - (call $~lib/array/Array#__get - (get_local $1) - (get_local $3) - ) + (get_local $4) + (get_local $5) ) (return (i32.const 0) @@ -2946,13 +2962,16 @@ (unreachable) ) ) + (set_local $3 + (call $~lib/internal/arraybuffer/computeSize + (get_local $2) + ) + ) (if (i32.le_s (get_local $1) (i32.sub - (call $~lib/internal/arraybuffer/computeSize - (get_local $2) - ) + (get_local $3) (i32.const 8) ) ) @@ -3046,9 +3065,9 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (set_local $3 + (set_local $4 (i32.add - (tee_local $2 + (tee_local $3 (i32.load offset=4 (get_local $0) ) @@ -3058,10 +3077,10 @@ ) (if (i32.ge_u - (get_local $2) + (get_local $3) (i32.shr_u (i32.load - (tee_local $4 + (tee_local $2 (i32.load (get_local $0) ) @@ -3073,7 +3092,7 @@ (block (if (i32.ge_u - (get_local $2) + (get_local $3) (i32.const 268435454) ) (block @@ -3086,35 +3105,36 @@ (unreachable) ) ) - (i32.store - (get_local $0) - (tee_local $4 - (call $~lib/internal/arraybuffer/reallocateUnsafe + (set_local $2 + (call $~lib/internal/arraybuffer/reallocateUnsafe + (get_local $2) + (i32.shl (get_local $4) - (i32.shl - (get_local $3) - (i32.const 2) - ) + (i32.const 2) ) ) ) + (i32.store + (get_local $0) + (get_local $2) + ) ) ) (i32.store offset=4 (get_local $0) - (get_local $3) + (get_local $4) ) (i32.store offset=8 (i32.add - (get_local $4) + (get_local $2) (i32.shl - (get_local $2) + (get_local $3) (i32.const 2) ) ) (get_local $1) ) - (get_local $3) + (get_local $4) ) (func $~lib/array/Array#pop (; 21 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -3562,7 +3582,6 @@ ) (func $~lib/array/Array#__set (; 27 ;) (; has Stack IR ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) (if (i32.ge_u (get_local $1) @@ -3593,26 +3612,28 @@ (unreachable) ) ) - (i32.store - (get_local $0) - (tee_local $3 - (call $~lib/internal/arraybuffer/reallocateUnsafe - (get_local $3) - (i32.shl - (tee_local $4 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 2) + (set_local $3 + (call $~lib/internal/arraybuffer/reallocateUnsafe + (get_local $3) + (i32.shl + (i32.add + (get_local $1) + (i32.const 1) ) + (i32.const 2) ) ) ) + (i32.store + (get_local $0) + (get_local $3) + ) (i32.store offset=4 (get_local $0) - (get_local $4) + (i32.add + (get_local $1) + (i32.const 1) + ) ) ) ) @@ -4674,7 +4695,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 456) - (i32.const 1000) + (i32.const 955) (i32.const 4) ) (unreachable) @@ -5372,6 +5393,10 @@ (func $std/array/isArraysEqual (; 78 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f32) + (local $6 f32) (if (i32.ne (tee_local $2 @@ -5405,33 +5430,45 @@ (get_local $2) ) ) - (br_if $continue|0 - (i32.eq - (call $~lib/builtins/isNaN - (call $~lib/array/Array#__get - (get_local $0) - (get_local $1) - ) - ) - (call $~lib/builtins/isNaN - (call $~lib/array/Array#__get - (i32.const 800) - (get_local $1) - ) - ) - ) - ) - (if - (f32.ne + (set_local $3 + (call $~lib/builtins/isNaN (call $~lib/array/Array#__get (get_local $0) (get_local $1) ) + ) + ) + (set_local $4 + (call $~lib/builtins/isNaN (call $~lib/array/Array#__get (i32.const 800) (get_local $1) ) ) + ) + (br_if $continue|0 + (i32.eq + (get_local $3) + (get_local $4) + ) + ) + (set_local $5 + (call $~lib/array/Array#__get + (get_local $0) + (get_local $1) + ) + ) + (set_local $6 + (call $~lib/array/Array#__get + (i32.const 800) + (get_local $1) + ) + ) + (if + (f32.ne + (get_local $5) + (get_local $6) + ) (return (i32.const 0) ) @@ -6150,6 +6187,10 @@ (func $std/array/isArraysEqual (; 86 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 f64) + (local $6 f64) (if (i32.ne (tee_local $2 @@ -6183,33 +6224,45 @@ (get_local $2) ) ) - (br_if $continue|0 - (i32.eq - (call $~lib/builtins/isNaN - (call $~lib/array/Array#__get - (get_local $0) - (get_local $1) - ) - ) - (call $~lib/builtins/isNaN - (call $~lib/array/Array#__get - (i32.const 1072) - (get_local $1) - ) - ) - ) - ) - (if - (f64.ne + (set_local $3 + (call $~lib/builtins/isNaN (call $~lib/array/Array#__get (get_local $0) (get_local $1) ) + ) + ) + (set_local $4 + (call $~lib/builtins/isNaN (call $~lib/array/Array#__get (i32.const 1072) (get_local $1) ) ) + ) + (br_if $continue|0 + (i32.eq + (get_local $3) + (get_local $4) + ) + ) + (set_local $5 + (call $~lib/array/Array#__get + (get_local $0) + (get_local $1) + ) + ) + (set_local $6 + (call $~lib/array/Array#__get + (i32.const 1072) + (get_local $1) + ) + ) + (if + (f64.ne + (get_local $5) + (get_local $6) + ) (return (i32.const 0) ) @@ -6943,7 +6996,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 456) - (i32.const 1007) + (i32.const 962) (i32.const 24) ) (unreachable) @@ -7003,6 +7056,7 @@ ) (func $std/array/createRandomOrderedArray (; 96 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) + (local $2 f64) (set_local $0 (call $~lib/array/Array#constructor (get_local $0) @@ -7018,12 +7072,15 @@ ) ) ) + (set_local $2 + (call $~lib/math/NativeMath.random) + ) (call $~lib/array/Array#__set (get_local $0) (get_local $1) (i32.trunc_s/f64 (f64.mul - (call $~lib/math/NativeMath.random) + (get_local $2) (f64.convert_s/i32 (i32.load offset=4 (get_local $0) @@ -7046,6 +7103,8 @@ (func $std/array/isSorted (; 97 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) (block $break|0 (set_local $2 (i32.const 1) @@ -7065,20 +7124,26 @@ (set_global $~argc (i32.const 2) ) + (set_local $4 + (call $~lib/array/Array#__get + (get_local $0) + (i32.sub + (get_local $2) + (i32.const 1) + ) + ) + ) + (set_local $5 + (call $~lib/array/Array#__get + (get_local $0) + (get_local $2) + ) + ) (if (i32.gt_s (call_indirect (type $iii) - (call $~lib/array/Array#__get - (get_local $0) - (i32.sub - (get_local $2) - (i32.const 1) - ) - ) - (call $~lib/array/Array#__get - (get_local $0) - (get_local $2) - ) + (get_local $4) + (get_local $5) (get_local $1) ) (i32.const 0) @@ -7137,6 +7202,7 @@ (func $std/array/createReverseOrderedNestedArray (; 101 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) (set_local $1 (call $~lib/array/Array#constructor (i32.const 512) @@ -7152,17 +7218,22 @@ ) ) ) - (call $~lib/array/Array#__set - (get_local $1) - (get_local $0) + (set_local $2 (call $~lib/array/Array#constructor (i32.const 1) ) ) (call $~lib/array/Array#__set - (call $~lib/array/Array#__get - (get_local $1) - (get_local $0) + (get_local $1) + (get_local $0) + (get_local $2) + ) + (call $~lib/array/Array#__set + (tee_local $2 + (call $~lib/array/Array#__get + (get_local $1) + (get_local $0) + ) ) (i32.const 0) (i32.sub @@ -7187,16 +7258,22 @@ (get_local $1) ) (func $start~anonymous|52 (; 102 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - (i32.sub + (set_local $0 (call $~lib/array/Array#__get (get_local $0) (i32.const 0) ) + ) + (set_local $1 (call $~lib/array/Array#__get (get_local $1) (i32.const 0) ) ) + (i32.sub + (get_local $0) + (get_local $1) + ) ) (func $~lib/array/Array>#sort (; 103 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7328,6 +7405,7 @@ (func $std/array/createReverseOrderedElementsArray (; 106 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) (set_local $1 (call $~lib/array/Array#constructor (i32.const 512) @@ -7343,9 +7421,7 @@ ) ) ) - (call $~lib/array/Array#__set - (get_local $1) - (get_local $0) + (set_local $2 (call $std/array/Proxy#constructor (i32.sub (i32.sub @@ -7358,6 +7434,11 @@ ) ) ) + (call $~lib/array/Array#__set + (get_local $1) + (get_local $0) + (get_local $2) + ) (set_local $0 (i32.add (get_local $0) @@ -7581,16 +7662,23 @@ ) ) (func $start~anonymous|54 (; 111 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) - (i32.sub + (local $2 i32) + (set_local $2 (call $~lib/string/String.__gt (get_local $0) (get_local $1) ) + ) + (set_local $0 (call $~lib/string/String.__lt (get_local $0) (get_local $1) ) ) + (i32.sub + (get_local $2) + (get_local $0) + ) ) (func $~lib/string/String.__eq (; 112 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -7657,6 +7745,8 @@ (func $std/array/isArraysEqual (; 114 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) + (local $5 i32) (if (i32.ne (tee_local $3 @@ -7689,16 +7779,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/array/Array#__get + (get_local $0) + (get_local $2) + ) + ) + (set_local $5 + (call $~lib/array/Array#__get + (get_local $1) + (get_local $2) + ) + ) (if (call $~lib/string/String.__ne - (call $~lib/array/Array#__get - (get_local $0) - (get_local $2) - ) - (call $~lib/array/Array#__get - (get_local $1) - (get_local $2) - ) + (get_local $4) + (get_local $5) ) (return (i32.const 0) @@ -7906,6 +8002,7 @@ (func $std/array/createRandomString (; 120 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) (local $2 i32) + (local $3 i32) (set_local $1 (i32.const 1464) ) @@ -7917,18 +8014,15 @@ (get_local $0) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) - (call $~lib/string/String#charAt - (i32.trunc_s/f64 - (f64.floor - (f64.mul - (call $~lib/math/NativeMath.random) - (f64.convert_s/i32 - (i32.load - (i32.const 488) - ) + (set_local $3 + (call $~lib/string/String#charAt + (i32.trunc_s/f64 + (f64.floor + (f64.mul + (call $~lib/math/NativeMath.random) + (f64.convert_s/i32 + (i32.load + (i32.const 488) ) ) ) @@ -7936,6 +8030,12 @@ ) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $3) + ) + ) (set_local $2 (i32.add (get_local $2) @@ -7950,6 +8050,7 @@ (func $std/array/createRandomStringArray (; 121 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) (local $1 i32) + (local $2 i32) (set_local $1 (call $~lib/array/Array#constructor (i32.const 400) @@ -7965,9 +8066,7 @@ ) ) ) - (call $~lib/array/Array#__set - (get_local $1) - (get_local $0) + (set_local $2 (call $std/array/createRandomString (i32.trunc_s/f64 (f64.mul @@ -7977,6 +8076,11 @@ ) ) ) + (call $~lib/array/Array#__set + (get_local $1) + (get_local $0) + (get_local $2) + ) (set_local $0 (i32.add (get_local $0) @@ -8557,7 +8661,7 @@ ) ) (if - (tee_local $1 + (tee_local $2 (i32.lt_s (get_local $0) (i32.const 0) @@ -8571,14 +8675,16 @@ ) ) (call $~lib/internal/number/utoa32_lut - (tee_local $2 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount32 + (get_local $0) + ) ) - (get_local $1) + (get_local $2) ) ) ) @@ -8587,13 +8693,13 @@ (get_local $3) ) (if - (get_local $1) + (get_local $2) (i32.store16 offset=4 - (get_local $2) + (get_local $1) (i32.const 45) ) ) - (get_local $2) + (get_local $1) ) (func $~lib/internal/number/itoa (; 127 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/number/itoa32 @@ -8601,6 +8707,7 @@ ) ) (func $~lib/internal/number/itoa_stream (; 128 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) (set_local $0 (i32.add (get_local $0) @@ -8625,7 +8732,7 @@ ) ) (if - (tee_local $1 + (tee_local $3 (i32.lt_s (get_local $2) (i32.const 0) @@ -8638,26 +8745,29 @@ ) ) ) + (set_local $1 + (call $~lib/internal/number/decimalCount32 + (get_local $2) + ) + ) (call $~lib/internal/number/utoa32_lut (get_local $0) (get_local $2) - (tee_local $2 + (tee_local $1 (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) (get_local $1) + (get_local $3) ) ) ) (if - (get_local $1) + (get_local $3) (i32.store16 offset=4 (get_local $0) (i32.const 45) ) ) - (get_local $2) + (get_local $1) ) (func $~lib/array/Array#join (; 129 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -8667,6 +8777,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) (if (i32.lt_s (tee_local $4 @@ -8734,24 +8845,27 @@ (get_local $4) ) ) - (set_local $2 - (i32.add + (set_local $9 + (call $~lib/internal/number/itoa_stream + (get_local $0) (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load offset=8 - (i32.add - (get_local $5) - (i32.shl - (get_local $3) - (i32.const 2) - ) + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $3) + (i32.const 2) ) ) ) ) ) + (set_local $2 + (i32.add + (get_local $2) + (get_local $9) + ) + ) (if (get_local $7) (block @@ -8779,6 +8893,21 @@ (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $0) + (get_local $2) + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $4) + (i32.const 2) + ) + ) + ) + ) + ) (set_local $3 (get_local $0) ) @@ -8788,19 +8917,7 @@ (tee_local $2 (i32.add (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load offset=8 - (i32.add - (get_local $5) - (i32.shl - (get_local $4) - (i32.const 2) - ) - ) - ) - ) + (get_local $1) ) ) ) @@ -8886,14 +9003,15 @@ ) ) ) + (set_local $3 + (call $~lib/internal/number/decimalCount32 + (get_local $2) + ) + ) (call $~lib/internal/number/utoa32_lut (get_local $0) (get_local $2) - (tee_local $3 - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) - ) + (get_local $3) ) (get_local $3) ) @@ -8905,6 +9023,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) (if (i32.lt_s (tee_local $4 @@ -8972,24 +9091,27 @@ (get_local $4) ) ) - (set_local $2 - (i32.add + (set_local $9 + (call $~lib/internal/number/itoa_stream + (get_local $0) (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load offset=8 - (i32.add - (get_local $5) - (i32.shl - (get_local $3) - (i32.const 2) - ) + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $3) + (i32.const 2) ) ) ) ) ) + (set_local $2 + (i32.add + (get_local $2) + (get_local $9) + ) + ) (if (get_local $7) (block @@ -9017,6 +9139,21 @@ (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $0) + (get_local $2) + (i32.load offset=8 + (i32.add + (get_local $5) + (i32.shl + (get_local $4) + (i32.const 2) + ) + ) + ) + ) + ) (set_local $3 (get_local $0) ) @@ -9026,19 +9163,7 @@ (tee_local $2 (i32.add (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load offset=8 - (i32.add - (get_local $5) - (i32.shl - (get_local $4) - (i32.const 2) - ) - ) - ) - ) + (get_local $1) ) ) ) @@ -9703,10 +9828,10 @@ ) ) (if - (tee_local $3 + (tee_local $4 (i32.le_s (get_local $1) - (tee_local $4 + (tee_local $3 (i32.add (get_local $1) (get_local $2) @@ -9714,40 +9839,40 @@ ) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 21) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (block $break|0 - (set_local $3 + (set_local $4 (get_local $1) ) (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $3) (get_local $4) + (get_local $3) ) ) (i32.store16 offset=4 (i32.add (get_local $0) (i32.shl - (get_local $3) + (get_local $4) (i32.const 1) ) ) (i32.const 48) ) - (set_local $3 + (set_local $4 (i32.add - (get_local $3) + (get_local $4) (i32.const 1) ) ) @@ -9758,42 +9883,42 @@ (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 3145774) ) (i32.add - (get_local $4) + (get_local $3) (i32.const 2) ) ) (block (result i32) (if - (tee_local $3 + (tee_local $4 (i32.gt_s - (get_local $4) + (get_local $3) (i32.const 0) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 21) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (call $~lib/internal/memory/memmove (i32.add - (tee_local $3 + (tee_local $4 (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) @@ -9801,7 +9926,7 @@ (i32.const 6) ) (i32.add - (get_local $3) + (get_local $4) (i32.const 4) ) (i32.shl @@ -9816,7 +9941,7 @@ (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) @@ -9829,21 +9954,21 @@ ) (block (result i32) (if - (tee_local $3 + (tee_local $4 (i32.lt_s (i32.const -6) - (get_local $4) + (get_local $3) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 0) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (call $~lib/internal/memory/memmove (i32.add @@ -9852,10 +9977,10 @@ (i32.const 4) ) (i32.shl - (tee_local $3 + (tee_local $4 (i32.sub (i32.const 2) - (get_local $4) + (get_local $3) ) ) (i32.const 1) @@ -9875,29 +10000,29 @@ (i32.const 3014704) ) (block $break|1 - (set_local $2 + (set_local $3 (i32.const 2) ) (loop $repeat|1 (br_if $break|1 (i32.ge_s - (get_local $2) (get_local $3) + (get_local $4) ) ) (i32.store16 offset=4 (i32.add (get_local $0) (i32.shl - (get_local $2) + (get_local $3) (i32.const 1) ) ) (i32.const 48) ) - (set_local $2 + (set_local $3 (i32.add - (get_local $2) + (get_local $3) (i32.const 1) ) ) @@ -9906,7 +10031,7 @@ ) (i32.add (get_local $1) - (get_local $3) + (get_local $4) ) ) (if (result i32) @@ -9919,7 +10044,7 @@ (get_local $0) (i32.const 101) ) - (set_local $3 + (set_local $4 (i32.add (get_local $0) (i32.const 4) @@ -9928,36 +10053,37 @@ (if (tee_local $0 (i32.lt_s - (tee_local $2 + (tee_local $3 (i32.sub - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 0) ) ) - (set_local $2 + (set_local $3 (i32.sub (i32.const 0) - (get_local $2) + (get_local $3) ) ) ) + (set_local $2 + (i32.add + (call $~lib/internal/number/decimalCount32 + (get_local $3) + ) + (i32.const 1) + ) + ) (call $~lib/internal/number/utoa32_lut + (get_local $4) (get_local $3) (get_local $2) - (tee_local $2 - (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) - (i32.const 1) - ) - ) ) (i32.store16 offset=4 - (get_local $3) + (get_local $4) (select (i32.const 45) (i32.const 43) @@ -10002,7 +10128,7 @@ ) (i32.const 101) ) - (set_local $3 + (set_local $4 (i32.add (get_local $0) (i32.const 4) @@ -10011,36 +10137,37 @@ (if (tee_local $0 (i32.lt_s - (tee_local $2 + (tee_local $3 (i32.sub - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 0) ) ) - (set_local $2 + (set_local $3 (i32.sub (i32.const 0) - (get_local $2) + (get_local $3) ) ) ) + (set_local $2 + (i32.add + (call $~lib/internal/number/decimalCount32 + (get_local $3) + ) + (i32.const 1) + ) + ) (call $~lib/internal/number/utoa32_lut + (get_local $4) (get_local $3) (get_local $2) - (tee_local $2 - (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) - (i32.const 1) - ) - ) ) (i32.store16 offset=4 - (get_local $3) + (get_local $4) (select (i32.const 45) (i32.const 43) @@ -10064,8 +10191,8 @@ ) (func $~lib/internal/number/dtoa_core (; 137 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i64) (local $7 i64) @@ -10073,12 +10200,13 @@ (local $9 i64) (local $10 i64) (local $11 i64) - (local $12 i32) - (local $13 i32) + (local $12 i64) + (local $13 i64) (local $14 i32) - (local $15 i64) + (local $15 i32) + (local $16 i32) (if - (tee_local $12 + (tee_local $14 (f64.lt (get_local $1) (f64.const 0) @@ -10100,9 +10228,9 @@ (i64.add (i64.shl (i64.extend_u/i32 - (tee_local $5 + (tee_local $3 (i32.ne - (tee_local $13 + (tee_local $15 (i32.wrap/i64 (i64.shr_u (i64.and @@ -10129,14 +10257,14 @@ ) ) ) - (set_local $5 + (set_local $3 (i32.sub - (tee_local $13 + (tee_local $15 (i32.sub (select - (get_local $13) + (get_local $15) (i32.const 1) - (get_local $5) + (get_local $3) ) (i32.const 1075) ) @@ -10144,10 +10272,10 @@ (i32.const 1) ) ) - (set_local $4 + (set_local $16 (i32.wrap/i64 (i64.clz - (tee_local $6 + (tee_local $4 (i64.add (i64.shl (get_local $2) @@ -10161,9 +10289,9 @@ ) (set_global $~lib/internal/number/_frc_plus (i64.shl - (get_local $6) + (get_local $4) (i64.extend_s/i32 - (get_local $4) + (get_local $16) ) ) ) @@ -10173,7 +10301,7 @@ (i64.shl (get_local $2) (i64.extend_s/i32 - (tee_local $14 + (tee_local $5 (i32.add (i64.eq (get_local $2) @@ -10189,13 +10317,13 @@ (i64.extend_s/i32 (i32.sub (i32.sub - (get_local $13) - (get_local $14) + (get_local $15) + (get_local $5) ) - (tee_local $5 + (tee_local $3 (i32.sub - (get_local $5) - (get_local $4) + (get_local $3) + (get_local $16) ) ) ) @@ -10203,17 +10331,17 @@ ) ) (set_global $~lib/internal/number/_exp - (get_local $5) + (get_local $3) ) (set_global $~lib/internal/number/_K (i32.sub (i32.const 348) (i32.shl - (tee_local $5 + (tee_local $3 (i32.add (i32.shr_s (i32.add - (tee_local $4 + (tee_local $16 (i32.trunc_s/f64 (tee_local $1 (f64.add @@ -10233,7 +10361,7 @@ ) (f64.ne (f64.convert_s/i32 - (get_local $4) + (get_local $16) ) (get_local $1) ) @@ -10247,7 +10375,7 @@ ) ) ) - (set_local $4 + (set_local $5 (i32.load (i32.const 4104) ) @@ -10259,7 +10387,7 @@ (i32.const 3840) ) (i32.shl - (get_local $5) + (get_local $3) (i32.const 3) ) ) @@ -10268,9 +10396,9 @@ (set_global $~lib/internal/number/_exp_pow (i32.load16_s offset=8 (i32.add - (get_local $4) + (get_local $5) (i32.shl - (get_local $5) + (get_local $3) (i32.const 1) ) ) @@ -10284,7 +10412,7 @@ (i64.shl (get_local $2) (i64.extend_s/i32 - (tee_local $4 + (tee_local $5 (i32.wrap/i64 (i64.clz (get_local $2) @@ -10299,7 +10427,7 @@ ) (tee_local $8 (i64.and - (tee_local $6 + (tee_local $4 (get_global $~lib/internal/number/_frc_pow) ) (i64.const 4294967295) @@ -10313,13 +10441,13 @@ (get_local $7) (tee_local $10 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $6 (i64.add (i64.mul (tee_local $11 @@ -10348,7 +10476,7 @@ (get_local $10) ) (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) @@ -10365,7 +10493,7 @@ (i64.mul (tee_local $9 (i64.and - (tee_local $3 + (tee_local $6 (get_global $~lib/internal/number/_frc_plus) ) (i64.const 4294967295) @@ -10373,30 +10501,30 @@ ) (tee_local $10 (i64.and - (get_local $6) + (get_local $4) (i64.const 4294967295) ) ) ) ) - (set_local $7 + (set_local $13 (i64.add (i64.mul (get_local $9) (tee_local $8 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $12 (i64.add (i64.mul (tee_local $11 (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) @@ -10412,7 +10540,7 @@ ) ) ) - (set_local $15 + (set_local $13 (i64.add (i64.add (i64.mul @@ -10420,13 +10548,13 @@ (get_local $8) ) (i64.shr_u - (get_local $3) + (get_local $12) (i64.const 32) ) ) (i64.shr_u (i64.add - (get_local $7) + (get_local $13) (i64.const 2147483647) ) (i64.const 32) @@ -10437,7 +10565,7 @@ (i64.mul (tee_local $7 (i64.and - (tee_local $3 + (tee_local $12 (get_global $~lib/internal/number/_frc_minus) ) (i64.const 4294967295) @@ -10445,30 +10573,30 @@ ) (tee_local $8 (i64.and - (get_local $6) + (get_local $4) (i64.const 4294967295) ) ) ) ) - (set_local $6 + (set_local $12 (i64.add (i64.mul (get_local $7) (tee_local $10 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $6 (i64.add (i64.mul (tee_local $11 (i64.shr_u - (get_local $3) + (get_local $12) (i64.const 32) ) ) @@ -10484,11 +10612,11 @@ ) ) ) - (set_local $3 + (set_local $6 (i64.sub - (tee_local $7 + (tee_local $13 (i64.sub - (get_local $15) + (get_local $13) (i64.const 1) ) ) @@ -10500,13 +10628,13 @@ (get_local $10) ) (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) (i64.shr_u (i64.add - (get_local $6) + (get_local $12) (i64.const 2147483647) ) (i64.const 32) @@ -10516,49 +10644,54 @@ ) ) ) - (i32.add - (call $~lib/internal/number/prettify - (i32.add - (get_local $0) - (i32.shl - (get_local $12) - (i32.const 1) - ) - ) - (i32.sub - (call $~lib/internal/number/genDigits - (get_local $0) - (get_local $2) - (tee_local $5 + (set_local $3 + (call $~lib/internal/number/genDigits + (get_local $0) + (get_local $2) + (tee_local $3 + (i32.sub + (i32.add (i32.sub - (i32.add - (i32.sub - (get_local $13) - (get_local $4) - ) - (tee_local $4 - (get_global $~lib/internal/number/_exp_pow) - ) - ) - (i32.const -64) + (get_local $15) + (get_local $5) + ) + (tee_local $5 + (get_global $~lib/internal/number/_exp_pow) ) ) - (get_local $7) - (i32.sub - (i32.add - (get_global $~lib/internal/number/_exp) - (get_local $4) - ) - (i32.const -64) - ) - (get_local $3) - (get_local $12) + (i32.const -64) ) - (get_local $12) ) - (get_global $~lib/internal/number/_K) + (get_local $13) + (i32.sub + (i32.add + (get_global $~lib/internal/number/_exp) + (get_local $5) + ) + (i32.const -64) + ) + (get_local $6) + (get_local $14) ) - (get_local $12) + ) + (i32.add + (tee_local $3 + (call $~lib/internal/number/prettify + (i32.add + (get_local $0) + (i32.shl + (get_local $14) + (i32.const 1) + ) + ) + (i32.sub + (get_local $3) + (get_local $14) + ) + (get_global $~lib/internal/number/_K) + ) + ) + (get_local $14) ) ) (func $~lib/internal/number/dtoa (; 138 ;) (; has Stack IR ;) (type $Fi) (param $0 f64) (result i32) @@ -10741,9 +10874,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) (if (i32.lt_s - (tee_local $3 + (tee_local $1 (i32.sub (i32.load (i32.const 4252) @@ -10774,7 +10908,7 @@ ) (if (i32.eqz - (get_local $3) + (get_local $1) ) (return (call $~lib/internal/number/dtoa @@ -10793,7 +10927,7 @@ (get_local $5) (i32.const 28) ) - (get_local $3) + (get_local $1) ) (i32.const 28) ) @@ -10804,26 +10938,29 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $1) (get_local $3) + (get_local $1) + ) + ) + (set_local $8 + (call $~lib/internal/number/dtoa_stream + (get_local $2) + (get_local $0) + (f64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $3) + (i32.const 3) + ) + ) + ) ) ) (set_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/dtoa_stream - (get_local $2) - (get_local $0) - (f64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 3) - ) - ) - ) - ) + (get_local $8) ) ) (if @@ -10844,41 +10981,45 @@ ) ) ) - (set_local $1 + (set_local $3 (i32.add - (get_local $1) + (get_local $3) (i32.const 1) ) ) (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/dtoa_stream + (get_local $2) + (get_local $0) + (f64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 3) + ) + ) + ) + ) + ) + (set_local $3 + (get_local $2) + ) (if (i32.gt_s (get_local $7) (tee_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/dtoa_stream - (tee_local $1 - (get_local $2) - ) - (get_local $0) - (f64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $3) - (i32.const 3) - ) - ) - ) - ) + (get_local $1) ) ) ) (block - (set_local $1 + (set_local $3 (call $~lib/string/String#substring (get_local $2) (get_local $0) @@ -10901,7 +11042,7 @@ (call $~lib/allocator/arena/__memory_free) ) ) - (get_local $1) + (get_local $3) ) (func $~lib/array/Array#join (; 141 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -11365,25 +11506,31 @@ ) ) (set_local $1 - (i32.add - (call $~lib/internal/number/decimalCount32 - (tee_local $2 - (i32.shr_s - (i32.shl - (get_local $2) - (i32.const 24) - ) - (i32.const 24) - ) + (call $~lib/internal/number/decimalCount32 + (i32.shr_s + (i32.shl + (get_local $2) + (i32.const 24) ) + (i32.const 24) ) - (get_local $3) ) ) (call $~lib/internal/number/utoa32_lut (get_local $0) - (get_local $2) - (get_local $1) + (i32.shr_s + (i32.shl + (get_local $2) + (i32.const 24) + ) + (i32.const 24) + ) + (tee_local $1 + (i32.add + (get_local $1) + (get_local $3) + ) + ) ) (if (get_local $3) @@ -11403,9 +11550,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) (if (i32.lt_s - (tee_local $3 + (tee_local $1 (i32.sub (i32.load (i32.const 4628) @@ -11436,7 +11584,7 @@ ) (if (i32.eqz - (get_local $3) + (get_local $1) ) (return (call $~lib/internal/number/itoa @@ -11455,7 +11603,7 @@ (get_local $5) (i32.const 11) ) - (get_local $3) + (get_local $1) ) (i32.const 11) ) @@ -11466,23 +11614,26 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $1) (get_local $3) + (get_local $1) + ) + ) + (set_local $8 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i32.load8_s offset=8 + (i32.add + (get_local $4) + (get_local $3) + ) + ) ) ) (set_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (get_local $2) - (get_local $0) - (i32.load8_s offset=8 - (i32.add - (get_local $4) - (get_local $1) - ) - ) - ) + (get_local $8) ) ) (if @@ -11503,38 +11654,42 @@ ) ) ) - (set_local $1 + (set_local $3 (i32.add - (get_local $1) + (get_local $3) (i32.const 1) ) ) (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i32.load8_s offset=8 + (i32.add + (get_local $4) + (get_local $1) + ) + ) + ) + ) + (set_local $3 + (get_local $2) + ) (if (i32.gt_s (get_local $7) (tee_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (tee_local $1 - (get_local $2) - ) - (get_local $0) - (i32.load8_s offset=8 - (i32.add - (get_local $4) - (get_local $3) - ) - ) - ) + (get_local $1) ) ) ) (block - (set_local $1 + (set_local $3 (call $~lib/string/String#substring (get_local $2) (get_local $0) @@ -11557,7 +11712,7 @@ (call $~lib/allocator/arena/__memory_free) ) ) - (get_local $1) + (get_local $3) ) (func $~lib/internal/number/itoa (; 148 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (call $~lib/internal/number/utoa32 @@ -11568,6 +11723,7 @@ ) ) (func $~lib/internal/number/itoa_stream (; 149 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) (set_local $0 (i32.add (get_local $0) @@ -11594,22 +11750,23 @@ ) ) ) - (set_local $1 + (set_local $3 (call $~lib/internal/number/decimalCount32 - (tee_local $2 - (i32.and - (get_local $2) - (i32.const 65535) - ) + (i32.and + (get_local $2) + (i32.const 65535) ) ) ) (call $~lib/internal/number/utoa32_lut (get_local $0) - (get_local $2) - (get_local $1) + (i32.and + (get_local $2) + (i32.const 65535) + ) + (get_local $3) ) - (get_local $1) + (get_local $3) ) (func $~lib/array/Array#join (; 150 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -11620,9 +11777,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) (if (i32.lt_s - (tee_local $3 + (tee_local $1 (i32.sub (i32.load (i32.const 4692) @@ -11653,7 +11811,7 @@ ) (if (i32.eqz - (get_local $3) + (get_local $1) ) (return (call $~lib/internal/number/itoa @@ -11672,7 +11830,7 @@ (get_local $5) (i32.const 10) ) - (get_local $3) + (get_local $1) ) (i32.const 10) ) @@ -11683,26 +11841,29 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $1) (get_local $3) + (get_local $1) + ) + ) + (set_local $8 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i32.load16_u offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $3) + (i32.const 1) + ) + ) + ) ) ) (set_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (get_local $2) - (get_local $0) - (i32.load16_u offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 1) - ) - ) - ) - ) + (get_local $8) ) ) (if @@ -11723,41 +11884,45 @@ ) ) ) - (set_local $1 + (set_local $3 (i32.add - (get_local $1) + (get_local $3) (i32.const 1) ) ) (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i32.load16_u offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 1) + ) + ) + ) + ) + ) + (set_local $3 + (get_local $2) + ) (if (i32.gt_s (get_local $7) (tee_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (tee_local $1 - (get_local $2) - ) - (get_local $0) - (i32.load16_u offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $3) - (i32.const 1) - ) - ) - ) - ) + (get_local $1) ) ) ) (block - (set_local $1 + (set_local $3 (call $~lib/string/String#substring (get_local $2) (get_local $0) @@ -11780,7 +11945,7 @@ (call $~lib/allocator/arena/__memory_free) ) ) - (get_local $1) + (get_local $3) ) (func $~lib/internal/number/decimalCount64 (; 151 ;) (; has Stack IR ;) (type $Ii) (param $0 i64) (result i32) (if (result i32) @@ -12095,14 +12260,17 @@ (get_local $1) ) ) - (call $~lib/internal/number/utoa64_lut - (get_local $0) - (get_local $2) - (tee_local $1 + (block + (set_local $1 (call $~lib/internal/number/decimalCount64 (get_local $2) ) ) + (call $~lib/internal/number/utoa64_lut + (get_local $0) + (get_local $2) + (get_local $1) + ) ) ) (get_local $1) @@ -12116,9 +12284,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) (if (i32.lt_s - (tee_local $3 + (tee_local $1 (i32.sub (i32.load (i32.const 5316) @@ -12149,7 +12318,7 @@ ) (if (i32.eqz - (get_local $3) + (get_local $1) ) (return (call $~lib/internal/number/itoa @@ -12168,7 +12337,7 @@ (get_local $5) (i32.const 20) ) - (get_local $3) + (get_local $1) ) (i32.const 20) ) @@ -12179,26 +12348,29 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $1) (get_local $3) + (get_local $1) + ) + ) + (set_local $8 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $3) + (i32.const 3) + ) + ) + ) ) ) (set_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (get_local $2) - (get_local $0) - (i64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 3) - ) - ) - ) - ) + (get_local $8) ) ) (if @@ -12219,41 +12391,45 @@ ) ) ) - (set_local $1 + (set_local $3 (i32.add - (get_local $1) + (get_local $3) (i32.const 1) ) ) (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 3) + ) + ) + ) + ) + ) + (set_local $3 + (get_local $2) + ) (if (i32.gt_s (get_local $7) (tee_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (tee_local $1 - (get_local $2) - ) - (get_local $0) - (i64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $3) - (i32.const 3) - ) - ) - ) - ) + (get_local $1) ) ) ) (block - (set_local $1 + (set_local $3 (call $~lib/string/String#substring (get_local $2) (get_local $0) @@ -12276,7 +12452,7 @@ (call $~lib/allocator/arena/__memory_free) ) ) - (get_local $1) + (get_local $3) ) (func $~lib/internal/number/itoa64 (; 157 ;) (; has Stack IR ;) (type $Ii) (param $0 i64) (result i32) (local $1 i32) @@ -12292,7 +12468,7 @@ ) ) (if - (tee_local $1 + (tee_local $2 (i64.lt_s (get_local $0) (i64.const 0) @@ -12311,50 +12487,54 @@ (i64.const 4294967295) ) (call $~lib/internal/number/utoa32_lut - (tee_local $3 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe - (tee_local $2 + (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount32 - (tee_local $4 - (i32.wrap/i64 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount32 + (tee_local $4 + (i32.wrap/i64 + (get_local $0) + ) ) ) ) - (get_local $1) + (get_local $2) ) ) ) ) (get_local $4) - (get_local $2) + (get_local $3) ) (call $~lib/internal/number/utoa64_lut - (tee_local $3 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe - (tee_local $2 + (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount64 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount64 + (get_local $0) + ) ) - (get_local $1) + (get_local $2) ) ) ) ) (get_local $0) - (get_local $2) + (get_local $3) ) ) (if - (get_local $1) + (get_local $2) (i32.store16 offset=4 - (get_local $3) + (get_local $1) (i32.const 45) ) ) - (get_local $3) + (get_local $1) ) (func $~lib/internal/number/itoa (; 158 ;) (; has Stack IR ;) (type $Ii) (param $0 i64) (result i32) (call $~lib/internal/number/itoa64 @@ -12407,33 +12587,40 @@ (i64.const 4294967295) ) (block - (set_local $1 - (i32.add - (call $~lib/internal/number/decimalCount32 - (tee_local $4 - (i32.wrap/i64 - (get_local $2) - ) + (set_local $4 + (call $~lib/internal/number/decimalCount32 + (tee_local $1 + (i32.wrap/i64 + (get_local $2) ) ) - (get_local $3) ) ) (call $~lib/internal/number/utoa32_lut (get_local $0) - (get_local $4) (get_local $1) + (tee_local $1 + (i32.add + (get_local $4) + (get_local $3) + ) + ) ) ) - (call $~lib/internal/number/utoa64_lut - (get_local $0) - (get_local $2) - (tee_local $1 - (i32.add - (call $~lib/internal/number/decimalCount64 - (get_local $2) + (block + (set_local $1 + (call $~lib/internal/number/decimalCount64 + (get_local $2) + ) + ) + (call $~lib/internal/number/utoa64_lut + (get_local $0) + (get_local $2) + (tee_local $1 + (i32.add + (get_local $1) + (get_local $3) ) - (get_local $3) ) ) ) @@ -12456,9 +12643,10 @@ (local $5 i32) (local $6 i32) (local $7 i32) + (local $8 i32) (if (i32.lt_s - (tee_local $3 + (tee_local $1 (i32.sub (i32.load (i32.const 5516) @@ -12489,7 +12677,7 @@ ) (if (i32.eqz - (get_local $3) + (get_local $1) ) (return (call $~lib/internal/number/itoa @@ -12508,7 +12696,7 @@ (get_local $5) (i32.const 21) ) - (get_local $3) + (get_local $1) ) (i32.const 21) ) @@ -12519,26 +12707,29 @@ (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $1) (get_local $3) + (get_local $1) + ) + ) + (set_local $8 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $3) + (i32.const 3) + ) + ) + ) ) ) (set_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (get_local $2) - (get_local $0) - (i64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $1) - (i32.const 3) - ) - ) - ) - ) + (get_local $8) ) ) (if @@ -12559,41 +12750,45 @@ ) ) ) - (set_local $1 + (set_local $3 (i32.add - (get_local $1) + (get_local $3) (i32.const 1) ) ) (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $2) + (get_local $0) + (i64.load offset=8 + (i32.add + (get_local $4) + (i32.shl + (get_local $1) + (i32.const 3) + ) + ) + ) + ) + ) + (set_local $3 + (get_local $2) + ) (if (i32.gt_s (get_local $7) (tee_local $0 (i32.add (get_local $0) - (call $~lib/internal/number/itoa_stream - (tee_local $1 - (get_local $2) - ) - (get_local $0) - (i64.load offset=8 - (i32.add - (get_local $4) - (i32.shl - (get_local $3) - (i32.const 3) - ) - ) - ) - ) + (get_local $1) ) ) ) (block - (set_local $1 + (set_local $3 (call $~lib/string/String#substring (get_local $2) (get_local $0) @@ -12616,7 +12811,7 @@ (call $~lib/allocator/arena/__memory_free) ) ) - (get_local $1) + (get_local $3) ) (func $~lib/array/Array>#join (; 161 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -12700,14 +12895,19 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $2 (call $~lib/array/Array#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $2) + ) + ) ) ) (if @@ -12740,14 +12940,19 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $0 (call $~lib/array/Array#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $0) + ) + ) ) ) (get_local $1) @@ -12761,6 +12966,7 @@ ) ) (func $~lib/internal/number/itoa_stream (; 163 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) (set_local $0 (i32.add (get_local $0) @@ -12787,22 +12993,23 @@ ) ) ) - (set_local $1 + (set_local $3 (call $~lib/internal/number/decimalCount32 - (tee_local $2 - (i32.and - (get_local $2) - (i32.const 255) - ) + (i32.and + (get_local $2) + (i32.const 255) ) ) ) (call $~lib/internal/number/utoa32_lut (get_local $0) - (get_local $2) - (get_local $1) + (i32.and + (get_local $2) + (i32.const 255) + ) + (get_local $3) ) - (get_local $1) + (get_local $3) ) (func $~lib/array/Array#join (; 164 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -12812,6 +13019,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) (if (i32.lt_s (tee_local $4 @@ -12879,19 +13087,22 @@ (get_local $4) ) ) + (set_local $9 + (call $~lib/internal/number/itoa_stream + (get_local $0) + (get_local $2) + (i32.load8_u offset=8 + (i32.add + (get_local $5) + (get_local $3) + ) + ) + ) + ) (set_local $2 (i32.add (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load8_u offset=8 - (i32.add - (get_local $5) - (get_local $3) - ) - ) - ) + (get_local $9) ) ) (if @@ -12921,6 +13132,18 @@ (br $repeat|0) ) ) + (set_local $1 + (call $~lib/internal/number/itoa_stream + (get_local $0) + (get_local $2) + (i32.load8_u offset=8 + (i32.add + (get_local $5) + (get_local $4) + ) + ) + ) + ) (set_local $3 (get_local $0) ) @@ -12930,16 +13153,7 @@ (tee_local $2 (i32.add (get_local $2) - (call $~lib/internal/number/itoa_stream - (get_local $0) - (get_local $2) - (i32.load8_u offset=8 - (i32.add - (get_local $5) - (get_local $4) - ) - ) - ) + (get_local $1) ) ) ) @@ -13051,14 +13265,19 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $2 (call $~lib/array/Array#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $2) + ) + ) ) ) (if @@ -13091,14 +13310,19 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $0 (call $~lib/array/Array#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $0) + ) + ) ) ) (get_local $1) @@ -13185,14 +13409,19 @@ ) ) ) - (set_local $2 - (call $~lib/string/String.__concat - (get_local $2) + (block + (set_local $3 (call $~lib/array/Array#join (get_local $3) (get_local $1) ) ) + (set_local $2 + (call $~lib/string/String.__concat + (get_local $2) + (get_local $3) + ) + ) ) ) (if @@ -13225,14 +13454,19 @@ ) ) ) - (set_local $2 - (call $~lib/string/String.__concat - (get_local $2) + (block + (set_local $0 (call $~lib/array/Array#join (get_local $3) (get_local $1) ) ) + (set_local $2 + (call $~lib/string/String.__concat + (get_local $2) + (get_local $0) + ) + ) ) ) (get_local $2) @@ -13319,14 +13553,19 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $2 (call $~lib/array/Array>#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $2) + ) + ) ) ) (if @@ -13359,20 +13598,28 @@ ) ) ) - (set_local $1 - (call $~lib/string/String.__concat - (get_local $1) + (block + (set_local $0 (call $~lib/array/Array>#join (get_local $2) (i32.const 1776) ) ) + (set_local $1 + (call $~lib/string/String.__concat + (get_local $1) + (get_local $0) + ) + ) ) ) (get_local $1) ) (func $start (; 168 ;) (; has Stack IR ;) (type $v) (local $0 i32) + (local $1 i32) + (local $2 f32) + (local $3 f32) (set_global $~lib/allocator/arena/startOffset (i32.const 5992) ) @@ -15788,18 +16035,24 @@ (unreachable) ) ) - (if - (f32.ne - (call $~lib/array/Array#__get - (get_global $std/array/newArr) + (set_local $2 + (call $~lib/array/Array#__get + (get_global $std/array/newArr) + (i32.const 0) + ) + ) + (set_local $3 + (f32.convert_s/i32 + (call $~lib/array/Array#__get + (get_global $std/array/arr) (i32.const 0) ) - (f32.convert_s/i32 - (call $~lib/array/Array#__get - (get_global $std/array/arr) - (i32.const 0) - ) - ) + ) + ) + (if + (f32.ne + (get_local $2) + (get_local $3) ) (block (call $~lib/env/abort @@ -16567,7 +16820,7 @@ ) (call $~lib/math/NativeMath.seedRandom (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (set_global $~argc @@ -17030,24 +17283,31 @@ (unreachable) ) ) - (call $~lib/array/Array#__unchecked_set - (tee_local $0 - (call $~lib/array/Array#constructor - (i32.const 3) - ) + (set_local $0 + (call $~lib/array/Array#constructor + (i32.const 3) ) - (i32.const 0) + ) + (set_local $1 (call $std/array/Ref#constructor) ) + (call $~lib/array/Array#__unchecked_set + (get_local $0) + (i32.const 0) + (get_local $1) + ) (call $~lib/array/Array#__unchecked_set (get_local $0) (i32.const 1) (i32.const 0) ) + (set_local $1 + (call $std/array/Ref#constructor) + ) (call $~lib/array/Array#__unchecked_set (get_local $0) (i32.const 2) - (call $std/array/Ref#constructor) + (get_local $1) ) (set_global $std/array/refArr (get_local $0) diff --git a/tests/compiler/std/array.untouched.wat b/tests/compiler/std/array.untouched.wat index 731aaef2..d2f668f5 100644 --- a/tests/compiler/std/array.untouched.wat +++ b/tests/compiler/std/array.untouched.wat @@ -26,103 +26,6 @@ (type $iIiv (func (param i32 i64 i32))) (type $iiIi (func (param i32 i32 i64) (result i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) - (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) - (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) - (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) - (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) - (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) - (global $~lib/internal/number/MAX_DOUBLE_LENGTH i32 (i32.const 28)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) - (global $std/array/arr (mut i32) (i32.const 0)) - (global $std/array/arr8 (mut i32) (i32.const 120)) - (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $~argc (mut i32) (i32.const 0)) - (global $std/array/arr32 (mut i32) (i32.const 288)) - (global $std/array/i (mut i32) (i32.const 0)) - (global $std/array/includes (mut i32) (i32.const 0)) - (global $std/array/every (mut i32) (i32.const 0)) - (global $std/array/some (mut i32) (i32.const 0)) - (global $std/array/newArr (mut i32) (i32.const 0)) - (global $std/array/filteredArr (mut i32) (i32.const 0)) - (global $std/array/boolVal (mut i32) (i32.const 0)) - (global $~lib/math/random_seeded (mut i32) (i32.const 0)) - (global $~lib/math/random_state0 (mut i64) (i64.const 0)) - (global $~lib/math/random_state1 (mut i64) (i64.const 0)) - (global $std/array/charset i32 (i32.const 488)) - (global $NaN f64 (f64.const nan:0x8000000000000)) - (global $Infinity f64 (f64.const inf)) - (global $std/array/f32ArrayTyped (mut i32) (i32.const 728)) - (global $std/array/f64ArrayTyped (mut i32) (i32.const 936)) - (global $std/array/i32ArrayTyped (mut i32) (i32.const 1112)) - (global $std/array/u32ArrayTyped (mut i32) (i32.const 1192)) - (global $std/array/reversed0 (mut i32) (i32.const 1248)) - (global $std/array/reversed1 (mut i32) (i32.const 1272)) - (global $std/array/reversed2 (mut i32) (i32.const 1296)) - (global $std/array/reversed4 (mut i32) (i32.const 1336)) - (global $std/array/expected4 (mut i32) (i32.const 1376)) - (global $std/array/reversed64 (mut i32) (i32.const 0)) - (global $std/array/reversed128 (mut i32) (i32.const 0)) - (global $std/array/reversed1024 (mut i32) (i32.const 0)) - (global $std/array/reversed10000 (mut i32) (i32.const 0)) - (global $std/array/randomized512 (mut i32) (i32.const 0)) - (global $std/array/randomized64 (mut i32) (i32.const 0)) - (global $std/array/randomized257 (mut i32) (i32.const 0)) - (global $std/array/reversedNested512 (mut i32) (i32.const 0)) - (global $std/array/reversedElements512 (mut i32) (i32.const 0)) - (global $std/array/randomStringsActual (mut i32) (i32.const 1536)) - (global $std/array/randomStringsExpected (mut i32) (i32.const 1608)) - (global $std/array/randomStrings400 (mut i32) (i32.const 0)) - (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43)) - (global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45)) - (global $~lib/internal/string/CharCode.DOT i32 (i32.const 46)) - (global $~lib/internal/string/CharCode._0 i32 (i32.const 48)) - (global $~lib/internal/string/CharCode._1 i32 (i32.const 49)) - (global $~lib/internal/string/CharCode._2 i32 (i32.const 50)) - (global $~lib/internal/string/CharCode._3 i32 (i32.const 51)) - (global $~lib/internal/string/CharCode._4 i32 (i32.const 52)) - (global $~lib/internal/string/CharCode._5 i32 (i32.const 53)) - (global $~lib/internal/string/CharCode._6 i32 (i32.const 54)) - (global $~lib/internal/string/CharCode._7 i32 (i32.const 55)) - (global $~lib/internal/string/CharCode._8 i32 (i32.const 56)) - (global $~lib/internal/string/CharCode._9 i32 (i32.const 57)) - (global $~lib/internal/string/CharCode.A i32 (i32.const 65)) - (global $~lib/internal/string/CharCode.B i32 (i32.const 66)) - (global $~lib/internal/string/CharCode.E i32 (i32.const 69)) - (global $~lib/internal/string/CharCode.N i32 (i32.const 78)) - (global $~lib/internal/string/CharCode.O i32 (i32.const 79)) - (global $~lib/internal/string/CharCode.X i32 (i32.const 88)) - (global $~lib/internal/string/CharCode.Z i32 (i32.const 90)) - (global $~lib/internal/string/CharCode.a i32 (i32.const 97)) - (global $~lib/internal/string/CharCode.b i32 (i32.const 98)) - (global $~lib/internal/string/CharCode.e i32 (i32.const 101)) - (global $~lib/internal/string/CharCode.n i32 (i32.const 110)) - (global $~lib/internal/string/CharCode.o i32 (i32.const 111)) - (global $~lib/internal/string/CharCode.x i32 (i32.const 120)) - (global $~lib/internal/string/CharCode.z i32 (i32.const 122)) - (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) - (global $std/array/refArr (mut i32) (i32.const 0)) - (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) - (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $std/array/subarr32 (mut i32) (i32.const 5816)) - (global $std/array/subarr8 (mut i32) (i32.const 5912)) - (global $std/array/subarrU32 (mut i32) (i32.const 5984)) - (global $HEAP_BASE i32 (i32.const 5992)) - (table 56 56 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $start~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27 $start~anonymous|28 $start~anonymous|29 $start~anonymous|30 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|34 $start~anonymous|35 $start~anonymous|36 $start~anonymous|37 $start~anonymous|38 $start~anonymous|39 $start~anonymous|40 $start~anonymous|41 $start~anonymous|42 $~lib/array/Array#sort|trampoline~anonymous|43 $~lib/array/Array#sort|trampoline~anonymous|44 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|46 $std/array/assertSortedDefault~anonymous|47 $start~anonymous|48 $start~anonymous|49 $start~anonymous|50 $start~anonymous|51 $start~anonymous|52 $start~anonymous|53 $start~anonymous|54 $start~anonymous|55) (memory $0 1) (data (i32.const 8) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") (data (i32.const 40) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") @@ -292,6 +195,103 @@ (data (i32.const 5960) "8\17\00\00\01\00\00\00") (data (i32.const 5968) "\04\00\00\00\00\00\00\00H\17\00\00\00\00\00\00") (data (i32.const 5984) "P\17\00\00\01\00\00\00") + (table 56 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1 $start~anonymous|2 $start~anonymous|3 $start~anonymous|4 $start~anonymous|5 $start~anonymous|6 $start~anonymous|7 $start~anonymous|8 $start~anonymous|9 $start~anonymous|10 $start~anonymous|11 $start~anonymous|12 $start~anonymous|13 $start~anonymous|14 $start~anonymous|15 $start~anonymous|16 $start~anonymous|17 $start~anonymous|18 $start~anonymous|19 $start~anonymous|20 $start~anonymous|21 $start~anonymous|22 $start~anonymous|23 $start~anonymous|24 $start~anonymous|25 $start~anonymous|26 $start~anonymous|27 $start~anonymous|28 $start~anonymous|29 $start~anonymous|30 $start~anonymous|31 $start~anonymous|32 $start~anonymous|33 $start~anonymous|34 $start~anonymous|35 $start~anonymous|36 $start~anonymous|37 $start~anonymous|38 $start~anonymous|39 $start~anonymous|40 $start~anonymous|41 $start~anonymous|42 $~lib/array/Array#sort|trampoline~anonymous|43 $~lib/array/Array#sort|trampoline~anonymous|44 $~lib/array/Array#sort|trampoline~anonymous|45 $~lib/array/Array#sort|trampoline~anonymous|46 $std/array/assertSortedDefault~anonymous|47 $start~anonymous|48 $start~anonymous|49 $start~anonymous|50 $start~anonymous|51 $start~anonymous|52 $start~anonymous|53 $start~anonymous|54 $start~anonymous|55) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) + (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) + (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) + (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) + (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) + (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) + (global $~lib/internal/number/MAX_DOUBLE_LENGTH i32 (i32.const 28)) + (global $~lib/internal/number/_K (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $std/array/arr (mut i32) (i32.const 0)) + (global $std/array/arr8 (mut i32) (i32.const 120)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $~argc (mut i32) (i32.const 0)) + (global $std/array/arr32 (mut i32) (i32.const 288)) + (global $std/array/i (mut i32) (i32.const 0)) + (global $std/array/includes (mut i32) (i32.const 0)) + (global $std/array/every (mut i32) (i32.const 0)) + (global $std/array/some (mut i32) (i32.const 0)) + (global $std/array/newArr (mut i32) (i32.const 0)) + (global $std/array/filteredArr (mut i32) (i32.const 0)) + (global $std/array/boolVal (mut i32) (i32.const 0)) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1 (mut i64) (i64.const 0)) + (global $std/array/charset i32 (i32.const 488)) + (global $NaN f64 (f64.const nan:0x8000000000000)) + (global $Infinity f64 (f64.const inf)) + (global $std/array/f32ArrayTyped (mut i32) (i32.const 728)) + (global $std/array/f64ArrayTyped (mut i32) (i32.const 936)) + (global $std/array/i32ArrayTyped (mut i32) (i32.const 1112)) + (global $std/array/u32ArrayTyped (mut i32) (i32.const 1192)) + (global $std/array/reversed0 (mut i32) (i32.const 1248)) + (global $std/array/reversed1 (mut i32) (i32.const 1272)) + (global $std/array/reversed2 (mut i32) (i32.const 1296)) + (global $std/array/reversed4 (mut i32) (i32.const 1336)) + (global $std/array/expected4 (mut i32) (i32.const 1376)) + (global $std/array/reversed64 (mut i32) (i32.const 0)) + (global $std/array/reversed128 (mut i32) (i32.const 0)) + (global $std/array/reversed1024 (mut i32) (i32.const 0)) + (global $std/array/reversed10000 (mut i32) (i32.const 0)) + (global $std/array/randomized512 (mut i32) (i32.const 0)) + (global $std/array/randomized64 (mut i32) (i32.const 0)) + (global $std/array/randomized257 (mut i32) (i32.const 0)) + (global $std/array/reversedNested512 (mut i32) (i32.const 0)) + (global $std/array/reversedElements512 (mut i32) (i32.const 0)) + (global $std/array/randomStringsActual (mut i32) (i32.const 1536)) + (global $std/array/randomStringsExpected (mut i32) (i32.const 1608)) + (global $std/array/randomStrings400 (mut i32) (i32.const 0)) + (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43)) + (global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45)) + (global $~lib/internal/string/CharCode.DOT i32 (i32.const 46)) + (global $~lib/internal/string/CharCode._0 i32 (i32.const 48)) + (global $~lib/internal/string/CharCode._1 i32 (i32.const 49)) + (global $~lib/internal/string/CharCode._2 i32 (i32.const 50)) + (global $~lib/internal/string/CharCode._3 i32 (i32.const 51)) + (global $~lib/internal/string/CharCode._4 i32 (i32.const 52)) + (global $~lib/internal/string/CharCode._5 i32 (i32.const 53)) + (global $~lib/internal/string/CharCode._6 i32 (i32.const 54)) + (global $~lib/internal/string/CharCode._7 i32 (i32.const 55)) + (global $~lib/internal/string/CharCode._8 i32 (i32.const 56)) + (global $~lib/internal/string/CharCode._9 i32 (i32.const 57)) + (global $~lib/internal/string/CharCode.A i32 (i32.const 65)) + (global $~lib/internal/string/CharCode.B i32 (i32.const 66)) + (global $~lib/internal/string/CharCode.E i32 (i32.const 69)) + (global $~lib/internal/string/CharCode.N i32 (i32.const 78)) + (global $~lib/internal/string/CharCode.O i32 (i32.const 79)) + (global $~lib/internal/string/CharCode.X i32 (i32.const 88)) + (global $~lib/internal/string/CharCode.Z i32 (i32.const 90)) + (global $~lib/internal/string/CharCode.a i32 (i32.const 97)) + (global $~lib/internal/string/CharCode.b i32 (i32.const 98)) + (global $~lib/internal/string/CharCode.e i32 (i32.const 101)) + (global $~lib/internal/string/CharCode.n i32 (i32.const 110)) + (global $~lib/internal/string/CharCode.o i32 (i32.const 111)) + (global $~lib/internal/string/CharCode.x i32 (i32.const 120)) + (global $~lib/internal/string/CharCode.z i32 (i32.const 122)) + (global $~lib/builtins/i32.MIN_VALUE i32 (i32.const -2147483648)) + (global $std/array/refArr (mut i32) (i32.const 0)) + (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $std/array/subarr32 (mut i32) (i32.const 5816)) + (global $std/array/subarr8 (mut i32) (i32.const 5912)) + (global $std/array/subarrU32 (mut i32) (i32.const 5984)) + (global $HEAP_BASE i32 (i32.const 5992)) (export "memory" (memory $0)) (export "table" (table $0)) (start $start) @@ -5967,7 +5967,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 456) - (i32.const 1000) + (i32.const 955) (i32.const 4) ) (unreachable) @@ -10184,7 +10184,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 456) - (i32.const 1007) + (i32.const 962) (i32.const 24) ) (unreachable) @@ -23785,7 +23785,7 @@ ) (call $~lib/math/NativeMath.seedRandom (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (drop diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 4a5dcc57..49995428 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -7,17 +7,20 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) + (memory $0 1) + (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/arraybuffer/buffer (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/internal/arraybuffer/computeSize (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (i32.shl @@ -2148,7 +2151,7 @@ (func $~lib/arraybuffer/ArrayBuffer#slice (; 8 ;) (; has Stack IR ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) - (set_local $3 + (set_local $4 (i32.load (get_local $0) ) @@ -2160,84 +2163,82 @@ (i32.const 0) ) (select - (tee_local $4 + (tee_local $3 (i32.add - (get_local $3) + (get_local $4) (get_local $1) ) ) (i32.const 0) (i32.gt_s - (get_local $4) + (get_local $3) (i32.const 0) ) ) (select - (tee_local $4 + (tee_local $3 (get_local $1) ) - (get_local $3) + (get_local $4) (i32.lt_s - (get_local $1) (get_local $3) + (get_local $4) ) ) ) ) (call $~lib/internal/memory/memmove - (tee_local $4 - (i32.add - (tee_local $3 - (call $~lib/internal/arraybuffer/allocateUnsafe - (tee_local $2 - (select - (tee_local $4 - (i32.sub - (tee_local $2 - (if (result i32) - (i32.lt_s - (get_local $2) - (i32.const 0) - ) - (select - (tee_local $4 - (i32.add - (get_local $3) - (get_local $2) - ) - ) - (i32.const 0) - (i32.gt_s + (i32.add + (tee_local $2 + (call $~lib/internal/arraybuffer/allocateUnsafe + (tee_local $3 + (select + (tee_local $3 + (i32.sub + (tee_local $2 + (if (result i32) + (i32.lt_s + (get_local $2) + (i32.const 0) + ) + (select + (tee_local $3 + (i32.add (get_local $4) - (i32.const 0) + (get_local $2) ) ) - (select - (tee_local $4 - (get_local $2) - ) + (i32.const 0) + (i32.gt_s (get_local $3) - (i32.lt_s - (get_local $2) - (get_local $3) - ) + (i32.const 0) + ) + ) + (select + (tee_local $3 + (get_local $2) + ) + (get_local $4) + (i32.lt_s + (get_local $3) + (get_local $4) ) ) ) - (get_local $1) ) + (get_local $1) ) + ) + (i32.const 0) + (i32.gt_s + (get_local $3) (i32.const 0) - (i32.gt_s - (get_local $4) - (i32.const 0) - ) ) ) ) ) - (i32.const 8) ) + (i32.const 8) ) (i32.add (i32.add @@ -2246,9 +2247,9 @@ ) (get_local $1) ) - (get_local $2) + (get_local $3) ) - (get_local $3) + (get_local $2) ) (func $~lib/arraybuffer/ArrayBuffer#slice|trampoline (; 9 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2283,6 +2284,8 @@ ) ) (func $start (; 11 ;) (; has Stack IR ;) (type $v) + (local $0 i32) + (local $1 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 160) ) @@ -2335,14 +2338,20 @@ (unreachable) ) ) + (set_local $0 + (call $~lib/arraybuffer/ArrayBuffer#get:data + (get_global $std/arraybuffer/sliced) + ) + ) + (set_local $1 + (call $~lib/arraybuffer/ArrayBuffer#get:data + (get_global $std/arraybuffer/buffer) + ) + ) (if (i32.eq - (call $~lib/arraybuffer/ArrayBuffer#get:data - (get_global $std/arraybuffer/sliced) - ) - (call $~lib/arraybuffer/ArrayBuffer#get:data - (get_global $std/arraybuffer/buffer) - ) + (get_local $0) + (get_local $1) ) (block (call $~lib/env/abort diff --git a/tests/compiler/std/arraybuffer.untouched.wat b/tests/compiler/std/arraybuffer.untouched.wat index 0fdcfb64..c7e35e81 100644 --- a/tests/compiler/std/arraybuffer.untouched.wat +++ b/tests/compiler/std/arraybuffer.untouched.wat @@ -4,6 +4,12 @@ (type $ii (func (param i32) (result i32))) (type $iiiv (func (param i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -17,13 +23,8 @@ (global $~argc (mut i32) (i32.const 0)) (global $std/arraybuffer/sliced (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 160)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\12\00\00\00s\00t\00d\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/internal/arraybuffer/computeSize (; 1 ;) (type $ii) (param $0 i32) (result i32) (i32.shl diff --git a/tests/compiler/std/constructor.optimized.wat b/tests/compiler/std/constructor.optimized.wat index 38e0b9fc..84fc13af 100644 --- a/tests/compiler/std/constructor.optimized.wat +++ b/tests/compiler/std/constructor.optimized.wat @@ -2,6 +2,9 @@ (type $ii (func (param i32) (result i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/constructor/emptyCtor (mut i32) (i32.const 0)) @@ -15,8 +18,8 @@ (global $std/constructor/ctorConditionallyReturns (mut i32) (i32.const 0)) (global $std/constructor/ctorAllocates (mut i32) (i32.const 0)) (global $std/constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/constructor.untouched.wat b/tests/compiler/std/constructor.untouched.wat index 435bc0d2..ad4e32f6 100644 --- a/tests/compiler/std/constructor.untouched.wat +++ b/tests/compiler/std/constructor.untouched.wat @@ -1,6 +1,9 @@ (module (type $ii (func (param i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -19,10 +22,8 @@ (global $std/constructor/ctorAllocates (mut i32) (i32.const 0)) (global $std/constructor/ctorConditionallyAllocates (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/gc-array.optimized.wat b/tests/compiler/std/gc-array.optimized.wat index e0cc7de6..d0023804 100644 --- a/tests/compiler/std/gc-array.optimized.wat +++ b/tests/compiler/std/gc-array.optimized.wat @@ -9,6 +9,13 @@ (type $i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 16) "\01") + (data (i32.const 40) "\02\00\00\00\00\00\00\00\18") + (data (i32.const 64) "\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 112) "\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 7 anyfunc) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $~lib/arraybuffer/ArrayBuffer~gc $~lib/arraybuffer/ArrayBuffer~gc $~lib/allocator/arena/__memory_free) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -20,13 +27,6 @@ (global $std/gc-array/arr (mut i32) (i32.const 48)) (global $~argc (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) - (table 7 7 anyfunc) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $~lib/arraybuffer/ArrayBuffer~gc $~lib/arraybuffer/ArrayBuffer~gc $~lib/allocator/arena/__memory_free) - (memory $0 1) - (data (i32.const 16) "\01") - (data (i32.const 40) "\02\00\00\00\00\00\00\00\18") - (data (i32.const 64) "\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-array/main)) @@ -2616,13 +2616,16 @@ (unreachable) ) ) + (set_local $3 + (call $~lib/internal/arraybuffer/computeSize + (get_local $2) + ) + ) (if (i32.le_s (get_local $1) (i32.sub - (call $~lib/internal/arraybuffer/computeSize - (get_local $2) - ) + (get_local $3) (i32.const 8) ) ) @@ -2749,7 +2752,6 @@ ) (func $~lib/array/Array#__set (; 25 ;) (; has Stack IR ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) - (local $4 i32) (if (i32.ge_u (get_local $1) @@ -2780,26 +2782,28 @@ (unreachable) ) ) - (i32.store - (get_local $0) - (tee_local $3 - (call $~lib/internal/arraybuffer/reallocateUnsafe - (get_local $3) - (i32.shl - (tee_local $4 - (i32.add - (get_local $1) - (i32.const 1) - ) - ) - (i32.const 2) + (set_local $3 + (call $~lib/internal/arraybuffer/reallocateUnsafe + (get_local $3) + (i32.shl + (i32.add + (get_local $1) + (i32.const 1) ) + (i32.const 2) ) ) ) + (i32.store + (get_local $0) + (get_local $3) + ) (i32.store offset=4 (get_local $0) - (get_local $4) + (i32.add + (get_local $1) + (i32.const 1) + ) ) ) ) @@ -2833,6 +2837,8 @@ (i32.const 0) ) (func $start (; 27 ;) (; has Stack IR ;) (type $v) + (local $0 i32) + (local $1 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 184) ) @@ -2843,31 +2849,49 @@ (i32.const 0) ) (call $~lib/gc/gc.collect) - (call $~lib/array/Array#__set + (set_local $0 (get_global $std/gc-array/arr) - (i32.const 0) + ) + (set_local $1 (call $~lib/collector/itcm/__gc_allocate (i32.const 0) (i32.const 4) ) ) - (call $~lib/gc/gc.collect) (call $~lib/array/Array#__set + (get_local $0) + (i32.const 0) + (get_local $1) + ) + (call $~lib/gc/gc.collect) + (set_local $0 (get_global $std/gc-array/arr) + ) + (set_local $1 + (call $~lib/collector/itcm/__gc_allocate + (i32.const 0) + (i32.const 4) + ) + ) + (call $~lib/array/Array#__set + (get_local $0) (i32.const 1) + (get_local $1) + ) + (call $~lib/gc/gc.collect) + (set_local $0 + (get_global $std/gc-array/arr) + ) + (set_local $1 (call $~lib/collector/itcm/__gc_allocate (i32.const 0) (i32.const 4) ) ) - (call $~lib/gc/gc.collect) (call $~lib/array/Array#__set - (get_global $std/gc-array/arr) + (get_local $0) (i32.const 0) - (call $~lib/collector/itcm/__gc_allocate - (i32.const 0) - (i32.const 4) - ) + (get_local $1) ) (call $~lib/gc/gc.collect) ) diff --git a/tests/compiler/std/gc-array.untouched.wat b/tests/compiler/std/gc-array.untouched.wat index 5fa977fc..afc09fb5 100644 --- a/tests/compiler/std/gc-array.untouched.wat +++ b/tests/compiler/std/gc-array.untouched.wat @@ -7,6 +7,13 @@ (type $iiiv (func (param i32 i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $i (func (result i32))) + (memory $0 1) + (data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00") + (data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 7 anyfunc) + (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -31,13 +38,6 @@ (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) (global $~started (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 180)) - (table 7 7 anyfunc) - (elem (i32.const 0) $null $~lib/arraybuffer/ArrayBuffer~gc $~lib/array/Array~gc $~lib/collector/itcm/__gc_mark $std/gc-array/Foo~gc $~lib/string/String~gc $~lib/internal/arraybuffer/__gc) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\01\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 32) "\00\00\00\00\00\00\00\00\02\00\00\00\00\00\00\00\18\00\00\00\00\00\00\00") - (data (i32.const 56) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 104) "\00\00\00\00\00\00\00\00\05\00\00\00\00\00\00\00\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-array/main)) diff --git a/tests/compiler/std/gc-basics.optimized.wat b/tests/compiler/std/gc-basics.optimized.wat index c6b4bd74..4e70d096 100644 --- a/tests/compiler/std/gc-basics.optimized.wat +++ b/tests/compiler/std/gc-basics.optimized.wat @@ -7,6 +7,10 @@ (type $i (func (result i32))) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") + (table 4 anyfunc) + (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -19,10 +23,6 @@ (global $std/gc-basics/obj (mut i32) (i32.const 0)) (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) - (table 4 4 anyfunc) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (memory $0 1) - (data (i32.const 16) "\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-basics/main)) diff --git a/tests/compiler/std/gc-basics.untouched.wat b/tests/compiler/std/gc-basics.untouched.wat index 93acf95c..7e6e1310 100644 --- a/tests/compiler/std/gc-basics.untouched.wat +++ b/tests/compiler/std/gc-basics.untouched.wat @@ -6,6 +6,10 @@ (type $iiv (func (param i32 i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $i (func (result i32))) + (memory $0 1) + (data (i32.const 8) "\00\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s\00") + (table 4 anyfunc) + (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -29,10 +33,6 @@ (global $std/gc-basics/obj2 (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 60)) - (table 4 4 anyfunc) - (elem (i32.const 0) $null $std/gc-basics/MyObject_visit $~lib/collector/itcm/__gc_mark $~lib/string/String~gc) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\10\00\00\00s\00t\00d\00/\00g\00c\00-\00b\00a\00s\00i\00c\00s\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-basics/main)) diff --git a/tests/compiler/std/gc-integration.optimized.wat b/tests/compiler/std/gc-integration.optimized.wat index 9bb3a89a..5e584c93 100644 --- a/tests/compiler/std/gc-integration.optimized.wat +++ b/tests/compiler/std/gc-integration.optimized.wat @@ -3,15 +3,15 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") + (table 2 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $std/gc-integration/B.d (mut i32) (i32.const 16)) (global $std/gc-integration/a_ref (mut i32) (i32.const 24)) (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) (global $std/gc-integration/i (mut i32) (i32.const 0)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/std/gc-integration.untouched.wat b/tests/compiler/std/gc-integration.untouched.wat index 19b0963f..d241a63c 100644 --- a/tests/compiler/std/gc-integration.untouched.wat +++ b/tests/compiler/std/gc-integration.untouched.wat @@ -2,6 +2,10 @@ (type $iv (func (param i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00") + (table 2 anyfunc) + (elem (i32.const 0) $null $start~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $std/gc-integration/B.c i32 (i32.const 8)) (global $std/gc-integration/B.d (mut i32) (i32.const 16)) @@ -10,10 +14,6 @@ (global $std/gc-integration/b_ref (mut i32) (i32.const 32)) (global $std/gc-integration/i (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 56)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $start~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\15\00\00\00s\00t\00d\00/\00g\00c\00-\00i\00n\00t\00e\00g\00r\00a\00t\00i\00o\00n\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/std/gc-object.optimized.wat b/tests/compiler/std/gc-object.optimized.wat index d8d2a71d..0e882cc3 100644 --- a/tests/compiler/std/gc-object.optimized.wat +++ b/tests/compiler/std/gc-object.optimized.wat @@ -5,6 +5,9 @@ (type $iiv (func (param i32 i32))) (type $FUNCSIG$v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 4 anyfunc) + (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Custom~gc $std/gc-object/Base~gc) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $~lib/collector/itcm/state (mut i32) (i32.const 0)) @@ -15,9 +18,6 @@ (global $~argc (mut i32) (i32.const 0)) (global $std/gc-object/obj (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) - (table 4 4 anyfunc) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Custom~gc $std/gc-object/Base~gc) - (memory $0 0) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-object/main)) diff --git a/tests/compiler/std/gc-object.untouched.wat b/tests/compiler/std/gc-object.untouched.wat index 85c34723..2d23f72d 100644 --- a/tests/compiler/std/gc-object.untouched.wat +++ b/tests/compiler/std/gc-object.untouched.wat @@ -4,6 +4,9 @@ (type $ii (func (param i32) (result i32))) (type $iv (func (param i32))) (type $iiv (func (param i32 i32))) + (memory $0 0) + (table 4 anyfunc) + (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Custom~gc $std/gc-object/Base~gc) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -25,9 +28,6 @@ (global $std/gc-object/obj (mut i32) (i32.const 0)) (global $~started (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 4 4 anyfunc) - (elem (i32.const 0) $null $~lib/collector/itcm/__gc_mark $std/gc-object/Custom~gc $std/gc-object/Base~gc) - (memory $0 0) (export "memory" (memory $0)) (export "table" (table $0)) (export "main" (func $std/gc-object/main)) diff --git a/tests/compiler/std/hash.optimized.wat b/tests/compiler/std/hash.optimized.wat index ce01dbe9..d0c2478a 100644 --- a/tests/compiler/std/hash.optimized.wat +++ b/tests/compiler/std/hash.optimized.wat @@ -6,7 +6,10 @@ (data (i32.const 16) "\01\00\00\00a") (data (i32.const 24) "\02\00\00\00a\00b") (data (i32.const 32) "\03\00\00\00a\00b\00c") + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/internal/hash/hashStr (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/hash.untouched.wat b/tests/compiler/std/hash.untouched.wat index 22f042d8..0d67cc4a 100644 --- a/tests/compiler/std/hash.untouched.wat +++ b/tests/compiler/std/hash.untouched.wat @@ -2,6 +2,13 @@ (type $ii (func (param i32) (result i32))) (type $Ii (func (param i64) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\00\00\00\00") + (data (i32.const 16) "\01\00\00\00a\00") + (data (i32.const 24) "\02\00\00\00a\00b\00") + (data (i32.const 32) "\03\00\00\00a\00b\00c\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -13,14 +20,8 @@ (global $Infinity f64 (f64.const inf)) (global $NaN f64 (f64.const nan:0x8000000000000)) (global $HEAP_BASE i32 (i32.const 44)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\00\00\00\00") - (data (i32.const 16) "\01\00\00\00a\00") - (data (i32.const 24) "\02\00\00\00a\00b\00") - (data (i32.const 32) "\03\00\00\00a\00b\00c\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/internal/hash/hashStr (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/libm.optimized.wat b/tests/compiler/std/libm.optimized.wat index 6ad6f38d..92ccde65 100644 --- a/tests/compiler/std/libm.optimized.wat +++ b/tests/compiler/std/libm.optimized.wat @@ -6,6 +6,9 @@ (type $Ff (func (param f64) (result f32))) (type $v (func)) (type $FUNCSIG$d (func (result f64))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $std/libm/E f64 (f64.const 2.718281828459045)) (global $std/libm/LN10 f64 (f64.const 2.302585092994046)) (global $std/libm/LN2 f64 (f64.const 0.6931471805599453)) @@ -14,8 +17,8 @@ (global $std/libm/PI f64 (f64.const 3.141592653589793)) (global $std/libm/SQRT1_2 f64 (f64.const 0.7071067811865476)) (global $std/libm/SQRT2 f64 (f64.const 1.4142135623730951)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) @@ -207,6 +210,14 @@ (f64.const 1.5707963267948966) ) ) + (set_local $1 + (call $~lib/math/R + (f64.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f64.sub (f64.const 1.5707963267948966) @@ -216,12 +227,7 @@ (f64.const 6.123233995736766e-17) (f64.mul (get_local $0) - (call $~lib/math/R - (f64.mul - (get_local $0) - (get_local $0) - ) - ) + (get_local $1) ) ) ) @@ -234,33 +240,39 @@ (get_local $4) (i32.const 31) ) - (return - (f64.mul - (f64.const 2) - (f64.sub - (f64.const 1.5707963267948966) - (f64.add - (tee_local $0 - (f64.sqrt - (tee_local $1 - (f64.mul - (f64.add - (f64.const 1) - (get_local $0) - ) - (f64.const 0.5) - ) - ) - ) - ) - (f64.sub - (f64.mul - (call $~lib/math/R - (get_local $1) - ) + (block + (set_local $0 + (f64.sqrt + (tee_local $1 + (f64.mul + (f64.add + (f64.const 1) (get_local $0) ) - (f64.const 6.123233995736766e-17) + (f64.const 0.5) + ) + ) + ) + ) + (set_local $1 + (call $~lib/math/R + (get_local $1) + ) + ) + (return + (f64.mul + (f64.const 2) + (f64.sub + (f64.const 1.5707963267948966) + (f64.add + (get_local $0) + (f64.sub + (f64.mul + (get_local $1) + (get_local $0) + ) + (f64.const 6.123233995736766e-17) + ) ) ) ) @@ -304,15 +316,18 @@ ) ) ) + (set_local $1 + (call $~lib/math/R + (get_local $1) + ) + ) (f64.mul (f64.const 2) (f64.add (get_local $3) (f64.add (f64.mul - (call $~lib/math/R - (get_local $1) - ) + (get_local $1) (get_local $0) ) (get_local $5) @@ -1059,17 +1074,20 @@ (get_local $0) ) ) + (set_local $1 + (call $~lib/math/R + (f64.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f64.add (get_local $0) (f64.mul (get_local $0) - (call $~lib/math/R - (f64.mul - (get_local $0) - (get_local $0) - ) - ) + (get_local $1) ) ) ) @@ -5494,50 +5512,45 @@ (get_local $2) ) ) - (return - (f64.mul - (get_local $13) - (tee_local $2 - (if (result f64) - (i32.le_s - (i32.shr_s - (tee_local $8 - (i32.add - (i32.wrap/i64 - (i64.shr_u - (i64.reinterpret/f64 - (tee_local $2 + (set_local $2 + (if (result f64) + (i32.le_s + (i32.shr_s + (tee_local $8 + (i32.add + (i32.wrap/i64 + (i64.shr_u + (i64.reinterpret/f64 + (tee_local $2 + (f64.sub + (f64.const 1) + (f64.sub (f64.sub - (f64.const 1) - (f64.sub - (f64.sub - (f64.div - (f64.mul + (f64.div + (f64.mul + (get_local $2) + (tee_local $9 + (f64.sub (get_local $2) - (tee_local $9 - (f64.sub - (get_local $2) + (f64.mul + (get_local $3) + (f64.add + (f64.const 0.16666666666666602) (f64.mul (get_local $3) (f64.add - (f64.const 0.16666666666666602) + (f64.const -2.7777777777015593e-03) (f64.mul (get_local $3) (f64.add - (f64.const -2.7777777777015593e-03) + (f64.const 6.613756321437934e-05) (f64.mul (get_local $3) (f64.add - (f64.const 6.613756321437934e-05) + (f64.const -1.6533902205465252e-06) (f64.mul (get_local $3) - (f64.add - (f64.const -1.6533902205465252e-06) - (f64.mul - (get_local $3) - (f64.const 4.1381367970572385e-08) - ) - ) + (f64.const 4.1381367970572385e-08) ) ) ) @@ -5548,69 +5561,75 @@ ) ) ) - (f64.sub - (get_local $9) - (f64.const 2) - ) ) - (f64.add - (tee_local $0 - (f64.sub - (get_local $6) - (f64.sub - (get_local $2) - (get_local $16) - ) - ) - ) - (f64.mul + ) + (f64.sub + (get_local $9) + (f64.const 2) + ) + ) + (f64.add + (tee_local $0 + (f64.sub + (get_local $6) + (f64.sub (get_local $2) - (get_local $0) + (get_local $16) ) ) ) - (get_local $2) + (f64.mul + (get_local $2) + (get_local $0) + ) ) ) + (get_local $2) ) ) - (i64.const 32) ) ) - (i32.shl - (get_local $7) - (i32.const 20) - ) + (i64.const 32) ) ) - (i32.const 20) - ) - (i32.const 0) - ) - (call $~lib/math/NativeMath.scalbn - (get_local $2) - (get_local $7) - ) - (f64.reinterpret/i64 - (i64.or - (i64.and - (i64.reinterpret/f64 - (get_local $2) - ) - (i64.const 4294967295) - ) - (i64.shl - (i64.extend_s/i32 - (get_local $8) - ) - (i64.const 32) + (i32.shl + (get_local $7) + (i32.const 20) ) ) ) + (i32.const 20) + ) + (i32.const 0) + ) + (call $~lib/math/NativeMath.scalbn + (get_local $2) + (get_local $7) + ) + (f64.reinterpret/i64 + (i64.or + (i64.and + (i64.reinterpret/f64 + (get_local $2) + ) + (i64.const 4294967295) + ) + (i64.shl + (i64.extend_s/i32 + (get_local $8) + ) + (i64.const 32) + ) ) ) ) ) + (return + (f64.mul + (get_local $13) + (get_local $2) + ) + ) ) (return (f64.mul @@ -5896,15 +5915,21 @@ ) ) ) - (f64.mul + (set_local $0 (f64.mul (f64.const 2) (get_local $2) ) + ) + (set_local $1 (call $~lib/math/expo2 (get_local $1) ) ) + (f64.mul + (get_local $0) + (get_local $1) + ) ) (func $std/libm/sinh (; 53 ;) (; has Stack IR ;) (type $FF) (param $0 f64) (result f64) (call $~lib/math/NativeMath.sinh diff --git a/tests/compiler/std/libm.untouched.wat b/tests/compiler/std/libm.untouched.wat index 289dd870..77d177d5 100644 --- a/tests/compiler/std/libm.untouched.wat +++ b/tests/compiler/std/libm.untouched.wat @@ -5,6 +5,9 @@ (type $FiF (func (param f64 i32) (result f64))) (type $Ff (func (param f64) (result f32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/math/NativeMath.E f64 (f64.const 2.718281828459045)) (global $std/libm/E f64 (f64.const 2.718281828459045)) (global $~lib/math/NativeMath.LN10 f64 (f64.const 2.302585092994046)) @@ -24,10 +27,8 @@ (global $NaN f64 (f64.const nan:0x8000000000000)) (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (export "E" (global $std/libm/E)) (export "LN10" (global $std/libm/LN10)) (export "LN2" (global $std/libm/LN2)) diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index 38b31767..b997c621 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -20,14 +20,17 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -507,24 +510,31 @@ (get_local $2) ) (func $~lib/map/Map#clear (; 7 ;) (; has Stack IR ;) (type $iv) (param $0 i32) - (i32.store - (get_local $0) + (local $1 i32) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 16) (i32.const 0) ) ) + (i32.store + (get_local $0) + (get_local $1) + ) (i32.store offset=4 (get_local $0) (i32.const 3) ) - (i32.store offset=8 - (get_local $0) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 48) (i32.const 1) ) ) + (i32.store offset=8 + (get_local $0) + (get_local $1) + ) (i32.store offset=12 (get_local $0) (i32.const 4) @@ -647,19 +657,23 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 11 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash8 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash8 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -672,7 +686,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -686,7 +700,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -724,7 +738,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -757,21 +771,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash8 + (i32.load8_s + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash8 - (i32.load8_s - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -781,7 +796,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -804,7 +819,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -812,7 +827,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -829,22 +844,23 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash8 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash8 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -969,21 +985,25 @@ ) ) (func $~lib/map/Map#get (; 14 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash8 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash8 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -1000,25 +1020,27 @@ ) (func $~lib/map/Map#delete (; 16 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash8 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash8 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) - ) + (get_local $0) ) ) ) @@ -1584,16 +1606,20 @@ ) ) (func $~lib/map/Map#has (; 18 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash8 + (i32.and + (get_local $1) + (i32.const 255) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash8 - (i32.and - (get_local $1) - (i32.const 255) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -1606,7 +1632,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -1620,7 +1646,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -1658,7 +1684,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -1691,21 +1717,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash8 + (i32.load8_u + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash8 - (i32.load8_u - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -1715,7 +1742,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -1738,7 +1765,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -1746,7 +1773,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -1763,19 +1790,20 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash8 + (i32.and + (get_local $1) + (i32.const 255) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash8 - (i32.and - (get_local $1) - (i32.const 255) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -1900,18 +1928,22 @@ ) ) (func $~lib/map/Map#get (; 21 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash8 + (i32.and + (get_local $1) + (i32.const 255) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash8 - (i32.and - (get_local $1) - (i32.const 255) - ) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -1923,22 +1955,24 @@ ) (func $~lib/map/Map#delete (; 22 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash8 + (i32.and + (get_local $1) + (i32.const 255) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash8 - (i32.and - (get_local $1) - (i32.const 255) - ) - ) - ) + (get_local $0) ) ) ) @@ -2570,19 +2604,23 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 26 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash16 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash16 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 16) - ) - (i32.const 16) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -2595,7 +2633,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -2609,7 +2647,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -2647,7 +2685,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -2680,21 +2718,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash16 + (i32.load16_s + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash16 - (i32.load16_s - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -2704,7 +2743,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -2727,7 +2766,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -2735,7 +2774,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -2752,22 +2791,23 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash16 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash16 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 16) - ) - (i32.const 16) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -2892,21 +2932,25 @@ ) ) (func $~lib/map/Map#get (; 29 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash16 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash16 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 16) - ) - (i32.const 16) - ) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -2918,25 +2962,27 @@ ) (func $~lib/map/Map#delete (; 30 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash16 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash16 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 16) - ) - (i32.const 16) - ) - ) - ) + (get_local $0) ) ) ) @@ -3502,16 +3548,20 @@ ) ) (func $~lib/map/Map#has (; 32 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash16 + (i32.and + (get_local $1) + (i32.const 65535) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash16 - (i32.and - (get_local $1) - (i32.const 65535) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -3524,7 +3574,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -3538,7 +3588,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -3576,7 +3626,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -3609,21 +3659,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash16 + (i32.load16_u + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash16 - (i32.load16_u - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -3633,7 +3684,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -3656,7 +3707,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -3664,7 +3715,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -3681,19 +3732,20 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash16 + (i32.and + (get_local $1) + (i32.const 65535) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash16 - (i32.and - (get_local $1) - (i32.const 65535) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -3818,18 +3870,22 @@ ) ) (func $~lib/map/Map#get (; 35 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash16 + (i32.and + (get_local $1) + (i32.const 65535) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash16 - (i32.and - (get_local $1) - (i32.const 65535) - ) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -3841,22 +3897,24 @@ ) (func $~lib/map/Map#delete (; 36 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash16 + (i32.and + (get_local $1) + (i32.const 65535) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash16 - (i32.and - (get_local $1) - (i32.const 65535) - ) - ) - ) + (get_local $0) ) ) ) @@ -4509,13 +4567,17 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 40 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -4528,7 +4590,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -4542,7 +4604,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -4580,7 +4642,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -4613,21 +4675,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash32 + (i32.load + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash32 - (i32.load - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -4637,7 +4700,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -4660,7 +4723,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -4668,7 +4731,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -4685,16 +4748,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash32 - (get_local $1) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -4819,15 +4883,19 @@ ) ) (func $~lib/map/Map#get (; 43 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (get_local $1) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -4839,19 +4907,21 @@ ) (func $~lib/map/Map#delete (; 44 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash32 - (get_local $1) - ) - ) + (get_local $0) ) ) ) @@ -5817,24 +5887,31 @@ ) ) (func $~lib/map/Map#clear (; 47 ;) (; has Stack IR ;) (type $iv) (param $0 i32) - (i32.store - (get_local $0) + (local $1 i32) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 16) (i32.const 0) ) ) + (i32.store + (get_local $0) + (get_local $1) + ) (i32.store offset=4 (get_local $0) (i32.const 3) ) - (i32.store offset=8 - (get_local $0) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 64) (i32.const 1) ) ) + (i32.store offset=8 + (get_local $0) + (get_local $1) + ) (i32.store offset=12 (get_local $0) (i32.const 4) @@ -6044,13 +6121,17 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 51 ;) (; has Stack IR ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash64 + (get_local $1) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash64 - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -6063,7 +6144,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -6077,7 +6158,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -6115,7 +6196,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -6148,21 +6229,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash64 + (i64.load + (get_local $3) + ) + ) + ) (i32.store offset=12 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash64 - (i64.load - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -6172,7 +6254,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -6195,7 +6277,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -6203,7 +6285,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -6220,16 +6302,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash64 + (get_local $1) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash64 - (get_local $1) - ) - ) + (get_local $5) ) ) (i32.store offset=8 @@ -6354,15 +6437,19 @@ ) ) (func $~lib/map/Map#get (; 54 ;) (; has Stack IR ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash64 + (get_local $1) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash64 - (get_local $1) - ) + (get_local $2) ) ) (i32.load offset=8 @@ -6375,19 +6462,21 @@ (func $~lib/map/Map#delete (; 55 ;) (; has Stack IR ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash64 + (get_local $1) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash64 - (get_local $1) - ) - ) + (get_local $0) ) ) ) @@ -7444,15 +7533,19 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 59 ;) (; has Stack IR ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (get_local $1) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -7465,7 +7558,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -7479,7 +7572,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -7517,7 +7610,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -7550,23 +7643,24 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (f32.load + (get_local $3) + ) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (f32.load - (get_local $3) - ) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -7576,7 +7670,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -7599,7 +7693,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -7607,7 +7701,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -7624,18 +7718,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (get_local $1) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -7760,17 +7855,21 @@ ) ) (func $~lib/map/Map#get (; 62 ;) (; has Stack IR ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (get_local $1) - ) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -7783,21 +7882,23 @@ (func $~lib/map/Map#delete (; 63 ;) (; has Stack IR ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (get_local $1) - ) - ) - ) + (get_local $0) ) ) ) @@ -8406,15 +8507,19 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 66 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (get_local $1) - ) - ) + (get_local $2) ) (i32.const 0) ) @@ -8427,7 +8532,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -8441,7 +8546,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -8479,7 +8584,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -8512,23 +8617,24 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (f64.load + (get_local $3) + ) + ) + ) + ) (i32.store offset=12 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (f64.load - (get_local $3) - ) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -8538,7 +8644,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -8561,7 +8667,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -8569,7 +8675,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -8586,18 +8692,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (get_local $1) - ) - ) - ) + (get_local $5) ) ) (i32.store offset=8 @@ -8722,17 +8829,21 @@ ) ) (func $~lib/map/Map#get (; 69 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (get_local $1) - ) - ) + (get_local $2) ) ) (i32.load offset=8 @@ -8745,21 +8856,23 @@ (func $~lib/map/Map#delete (; 70 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/map/Map#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (get_local $1) - ) - ) - ) + (get_local $0) ) ) ) diff --git a/tests/compiler/std/map.untouched.wat b/tests/compiler/std/map.untouched.wat index 7c6bce6a..c8d65441 100644 --- a/tests/compiler/std/map.untouched.wat +++ b/tests/compiler/std/map.untouched.wat @@ -17,6 +17,12 @@ (type $iFi (func (param i32 f64) (result i32))) (type $iFii (func (param i32 f64 i32) (result i32))) (type $iFiv (func (param i32 f64 i32))) + (memory $0 1) + (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -34,13 +40,8 @@ (global $~lib/map/FREE_FACTOR f64 (f64.const 0.75)) (global $~lib/map/FILL_FACTOR f64 (f64.const 2.6666666666666665)) (global $HEAP_BASE i32 (i32.const 144)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00m\00a\00p\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 2639a6db..0fa7c47e 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -30,50 +30,53 @@ (type $FUNCSIG$iffi (func (param f32 f32 i32) (result i32))) (type $FUNCSIG$idddi (func (param f64 f64 f64 i32) (result i32))) (type $FUNCSIG$ifffi (func (param f32 f32 f32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "JSMath" "E" (global $~lib/math/JSMath.E f64)) - (import "JSMath" "LN2" (global $~lib/math/JSMath.LN2 f64)) - (import "JSMath" "LN10" (global $~lib/math/JSMath.LN10 f64)) - (import "JSMath" "LOG2E" (global $~lib/math/JSMath.LOG2E f64)) - (import "JSMath" "PI" (global $~lib/math/JSMath.PI f64)) - (import "JSMath" "SQRT1_2" (global $~lib/math/JSMath.SQRT1_2 f64)) - (import "JSMath" "SQRT2" (global $~lib/math/JSMath.SQRT2 f64)) - (import "JSMath" "abs" (func $~lib/math/JSMath.abs (param f64) (result f64))) - (import "JSMath" "acos" (func $~lib/math/JSMath.acos (param f64) (result f64))) - (import "JSMath" "acosh" (func $~lib/math/JSMath.acosh (param f64) (result f64))) - (import "JSMath" "asin" (func $~lib/math/JSMath.asin (param f64) (result f64))) - (import "JSMath" "asinh" (func $~lib/math/JSMath.asinh (param f64) (result f64))) - (import "JSMath" "atan" (func $~lib/math/JSMath.atan (param f64) (result f64))) - (import "JSMath" "atanh" (func $~lib/math/JSMath.atanh (param f64) (result f64))) - (import "JSMath" "atan2" (func $~lib/math/JSMath.atan2 (param f64 f64) (result f64))) - (import "JSMath" "cbrt" (func $~lib/math/JSMath.cbrt (param f64) (result f64))) - (import "JSMath" "ceil" (func $~lib/math/JSMath.ceil (param f64) (result f64))) - (import "JSMath" "cosh" (func $~lib/math/JSMath.cosh (param f64) (result f64))) - (import "JSMath" "exp" (func $~lib/math/JSMath.exp (param f64) (result f64))) - (import "JSMath" "expm1" (func $~lib/math/JSMath.expm1 (param f64) (result f64))) - (import "JSMath" "floor" (func $~lib/math/JSMath.floor (param f64) (result f64))) - (import "JSMath" "hypot" (func $~lib/math/JSMath.hypot (param f64 f64) (result f64))) - (import "JSMath" "log" (func $~lib/math/JSMath.log (param f64) (result f64))) - (import "JSMath" "log10" (func $~lib/math/JSMath.log10 (param f64) (result f64))) - (import "JSMath" "log1p" (func $~lib/math/JSMath.log1p (param f64) (result f64))) - (import "JSMath" "log2" (func $~lib/math/JSMath.log2 (param f64) (result f64))) - (import "JSMath" "max" (func $~lib/math/JSMath.max (param f64 f64) (result f64))) - (import "JSMath" "min" (func $~lib/math/JSMath.min (param f64 f64) (result f64))) - (import "JSOp" "mod" (func $std/math/JSOp.mod (param f64 f64) (result f64))) - (import "JSMath" "pow" (func $~lib/math/JSMath.pow (param f64 f64) (result f64))) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (import "JSMath" "sign" (func $~lib/math/JSMath.sign (param f64) (result f64))) - (import "JSMath" "sinh" (func $~lib/math/JSMath.sinh (param f64) (result f64))) - (import "JSMath" "sqrt" (func $~lib/math/JSMath.sqrt (param f64) (result f64))) - (import "JSMath" "tanh" (func $~lib/math/JSMath.tanh (param f64) (result f64))) - (import "JSMath" "trunc" (func $~lib/math/JSMath.trunc (param f64) (result f64))) - (global $~lib/math/random_seeded (mut i32) (i32.const 0)) - (global $~lib/math/random_state0 (mut i64) (i64.const 0)) - (global $~lib/math/random_state1 (mut i64) (i64.const 0)) (memory $0 1) (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s") (data (i32.const 40) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "Math" "E" (global $~lib/bindings/Math/E f64)) + (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) + (import "Math" "LN10" (global $~lib/bindings/Math/LN10 f64)) + (import "Math" "LOG2E" (global $~lib/bindings/Math/LOG2E f64)) + (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) + (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) + (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) + (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) + (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) + (import "Math" "asin" (func $~lib/bindings/Math/asin (param f64) (result f64))) + (import "Math" "asinh" (func $~lib/bindings/Math/asinh (param f64) (result f64))) + (import "Math" "atan" (func $~lib/bindings/Math/atan (param f64) (result f64))) + (import "Math" "atanh" (func $~lib/bindings/Math/atanh (param f64) (result f64))) + (import "Math" "atan2" (func $~lib/bindings/Math/atan2 (param f64 f64) (result f64))) + (import "Math" "cbrt" (func $~lib/bindings/Math/cbrt (param f64) (result f64))) + (import "Math" "ceil" (func $~lib/bindings/Math/ceil (param f64) (result f64))) + (import "Math" "cosh" (func $~lib/bindings/Math/cosh (param f64) (result f64))) + (import "Math" "exp" (func $~lib/bindings/Math/exp (param f64) (result f64))) + (import "Math" "expm1" (func $~lib/bindings/Math/expm1 (param f64) (result f64))) + (import "Math" "floor" (func $~lib/bindings/Math/floor (param f64) (result f64))) + (import "Math" "hypot" (func $~lib/bindings/Math/hypot (param f64 f64) (result f64))) + (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) + (import "Math" "log10" (func $~lib/bindings/Math/log10 (param f64) (result f64))) + (import "Math" "log1p" (func $~lib/bindings/Math/log1p (param f64) (result f64))) + (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) + (import "Math" "max" (func $~lib/bindings/Math/max (param f64 f64) (result f64))) + (import "Math" "min" (func $~lib/bindings/Math/min (param f64 f64) (result f64))) + (import "math" "mod" (func $std/math/mod (param f64 f64) (result f64))) + (import "Math" "pow" (func $~lib/bindings/Math/pow (param f64 f64) (result f64))) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "Math" "sign" (func $~lib/bindings/Math/sign (param f64) (result f64))) + (import "Math" "sinh" (func $~lib/bindings/Math/sinh (param f64) (result f64))) + (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) + (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) + (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) + (global $~lib/math/random_seeded (mut i32) (i32.const 0)) + (global $~lib/math/random_state0 (mut i64) (i64.const 0)) + (global $~lib/math/random_state1 (mut i64) (i64.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/builtins/isNaN (; 30 ;) (; has Stack IR ;) (type $Fi) (param $0 f64) (result i32) (f64.ne @@ -246,6 +249,7 @@ ) (func $std/math/ulperr (; 35 ;) (; has Stack IR ;) (type $FFFF) (param $0 f64) (param $1 f64) (param $2 f64) (result f64) (local $3 i32) + (local $4 i32) (if (tee_local $3 (call $~lib/builtins/isNaN @@ -270,14 +274,20 @@ (get_local $1) ) (block + (set_local $4 + (call $std/math/signbit + (get_local $0) + ) + ) + (set_local $3 + (call $std/math/signbit + (get_local $1) + ) + ) (if (i32.eq - (call $std/math/signbit - (get_local $0) - ) - (call $std/math/signbit - (get_local $1) - ) + (get_local $4) + (get_local $3) ) (return (get_local $2) @@ -309,17 +319,25 @@ ) ) ) - (f64.add - (call $~lib/math/NativeMath.scalbn - (f64.sub - (get_local $0) + (set_local $0 + (f64.sub + (get_local $0) + (get_local $1) + ) + ) + (set_local $3 + (i32.sub + (i32.const 0) + (call $std/math/eulp (get_local $1) ) - (i32.sub - (i32.const 0) - (call $std/math/eulp - (get_local $1) - ) + ) + ) + (f64.add + (tee_local $0 + (call $~lib/math/NativeMath.scalbn + (get_local $0) + (get_local $3) ) ) (get_local $2) @@ -527,6 +545,7 @@ ) (func $std/math/ulperrf (; 42 ;) (; has Stack IR ;) (type $ffff) (param $0 f32) (param $1 f32) (param $2 f32) (result f32) (local $3 i32) + (local $4 i32) (if (tee_local $3 (call $~lib/builtins/isNaN @@ -551,14 +570,20 @@ (get_local $1) ) (block + (set_local $4 + (call $std/math/signbitf + (get_local $0) + ) + ) + (set_local $3 + (call $std/math/signbitf + (get_local $1) + ) + ) (if (i32.eq - (call $std/math/signbitf - (get_local $0) - ) - (call $std/math/signbitf - (get_local $1) - ) + (get_local $4) + (get_local $3) ) (return (get_local $2) @@ -590,17 +615,25 @@ ) ) ) - (f32.add - (call $~lib/math/NativeMathf.scalbn - (f32.sub - (get_local $0) + (set_local $0 + (f32.sub + (get_local $0) + (get_local $1) + ) + ) + (set_local $3 + (i32.sub + (i32.const 0) + (call $std/math/eulpf (get_local $1) ) - (i32.sub - (i32.const 0) - (call $std/math/eulpf - (get_local $1) - ) + ) + ) + (f32.add + (tee_local $0 + (call $~lib/math/NativeMathf.scalbn + (get_local $0) + (get_local $3) ) ) (get_local $2) @@ -678,7 +711,7 @@ (set_local $2 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.abs + (call $~lib/bindings/Math/abs (get_local $0) ) ) @@ -842,6 +875,14 @@ (f64.const 1.5707963267948966) ) ) + (set_local $1 + (call $~lib/math/R + (f64.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f64.sub (f64.const 1.5707963267948966) @@ -851,12 +892,7 @@ (f64.const 6.123233995736766e-17) (f64.mul (get_local $0) - (call $~lib/math/R - (f64.mul - (get_local $0) - (get_local $0) - ) - ) + (get_local $1) ) ) ) @@ -869,33 +905,39 @@ (get_local $4) (i32.const 31) ) - (return - (f64.mul - (f64.const 2) - (f64.sub - (f64.const 1.5707963267948966) - (f64.add - (tee_local $0 - (f64.sqrt - (tee_local $1 - (f64.mul - (f64.add - (f64.const 1) - (get_local $0) - ) - (f64.const 0.5) - ) - ) - ) - ) - (f64.sub - (f64.mul - (call $~lib/math/R - (get_local $1) - ) + (block + (set_local $0 + (f64.sqrt + (tee_local $1 + (f64.mul + (f64.add + (f64.const 1) (get_local $0) ) - (f64.const 6.123233995736766e-17) + (f64.const 0.5) + ) + ) + ) + ) + (set_local $1 + (call $~lib/math/R + (get_local $1) + ) + ) + (return + (f64.mul + (f64.const 2) + (f64.sub + (f64.const 1.5707963267948966) + (f64.add + (get_local $0) + (f64.sub + (f64.mul + (get_local $1) + (get_local $0) + ) + (f64.const 6.123233995736766e-17) + ) ) ) ) @@ -939,15 +981,18 @@ ) ) ) + (set_local $1 + (call $~lib/math/R + (get_local $1) + ) + ) (f64.mul (f64.const 2) (f64.add (get_local $3) (f64.add (f64.mul - (call $~lib/math/R - (get_local $1) - ) + (get_local $1) (get_local $0) ) (get_local $5) @@ -970,7 +1015,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.acos + (call $~lib/bindings/Math/acos (get_local $0) ) ) @@ -1009,8 +1054,8 @@ ) ) (func $~lib/math/NativeMathf.acos (; 52 ;) (; has Stack IR ;) (type $ff) (param $0 f32) (result f32) - (local $1 i32) - (local $2 f32) + (local $1 f32) + (local $2 i32) (local $3 i32) (local $4 f32) (local $5 f32) @@ -1018,7 +1063,7 @@ (i32.ge_u (tee_local $3 (i32.and - (tee_local $1 + (tee_local $2 (i32.reinterpret/f32 (get_local $0) ) @@ -1037,7 +1082,7 @@ (block (if (i32.shr_u - (get_local $1) + (get_local $2) (i32.const 31) ) (return @@ -1075,6 +1120,14 @@ (f32.const 1.570796251296997) ) ) + (set_local $1 + (call $~lib/math/Rf + (f32.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f32.sub (f32.const 1.570796251296997) @@ -1084,12 +1137,7 @@ (f32.const 7.549789415861596e-08) (f32.mul (get_local $0) - (call $~lib/math/Rf - (f32.mul - (get_local $0) - (get_local $0) - ) - ) + (get_local $1) ) ) ) @@ -1099,47 +1147,53 @@ ) (if (i32.shr_u - (get_local $1) + (get_local $2) (i32.const 31) ) - (return - (f32.mul - (f32.const 2) - (f32.sub - (f32.const 1.570796251296997) - (f32.add - (tee_local $2 - (f32.sqrt - (tee_local $0 - (f32.mul - (f32.add - (f32.const 1) - (get_local $0) - ) - (f32.const 0.5) - ) - ) + (block + (set_local $0 + (f32.sqrt + (tee_local $1 + (f32.mul + (f32.add + (f32.const 1) + (get_local $0) ) + (f32.const 0.5) ) - (f32.sub - (f32.mul - (call $~lib/math/Rf + ) + ) + ) + (set_local $1 + (call $~lib/math/Rf + (get_local $1) + ) + ) + (return + (f32.mul + (f32.const 2) + (f32.sub + (f32.const 1.570796251296997) + (f32.add + (get_local $0) + (f32.sub + (f32.mul + (get_local $1) (get_local $0) ) - (get_local $2) + (f32.const 7.549789415861596e-08) ) - (f32.const 7.549789415861596e-08) ) ) ) ) ) ) - (set_local $1 + (set_local $2 (i32.reinterpret/f32 - (tee_local $2 + (tee_local $0 (f32.sqrt - (tee_local $0 + (tee_local $1 (f32.mul (f32.sub (f32.const 1) @@ -1155,12 +1209,12 @@ (set_local $5 (f32.div (f32.sub - (get_local $0) + (get_local $1) (f32.mul (tee_local $4 (f32.reinterpret/i32 (i32.and - (get_local $1) + (get_local $2) (i32.const -4096) ) ) @@ -1169,21 +1223,24 @@ ) ) (f32.add - (get_local $2) + (get_local $0) (get_local $4) ) ) ) + (set_local $1 + (call $~lib/math/Rf + (get_local $1) + ) + ) (f32.mul (f32.const 2) (f32.add (get_local $4) (f32.add (f32.mul - (call $~lib/math/Rf - (get_local $0) - ) - (get_local $2) + (get_local $1) + (get_local $0) ) (get_local $5) ) @@ -1857,7 +1914,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.acosh + (call $~lib/bindings/Math/acosh (get_local $0) ) ) @@ -2495,17 +2552,20 @@ (get_local $0) ) ) + (set_local $1 + (call $~lib/math/R + (f64.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f64.add (get_local $0) (f64.mul (get_local $0) - (call $~lib/math/R - (f64.mul - (get_local $0) - (get_local $0) - ) - ) + (get_local $1) ) ) ) @@ -2632,7 +2692,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.asin + (call $~lib/bindings/Math/asin (get_local $0) ) ) @@ -2647,6 +2707,8 @@ (local $1 i32) (local $2 i32) (local $3 f64) + (local $4 f32) + (local $5 f64) (if (i32.ge_u (tee_local $2 @@ -2714,22 +2776,49 @@ (get_local $0) ) ) + (set_local $4 + (call $~lib/math/Rf + (f32.mul + (get_local $0) + (get_local $0) + ) + ) + ) (return (f32.add (get_local $0) (f32.mul (get_local $0) - (call $~lib/math/Rf - (f32.mul - (get_local $0) + (get_local $4) + ) + ) + ) + ) + ) + (set_local $3 + (f64.sqrt + (f64.promote/f32 + (tee_local $0 + (f32.mul + (f32.sub + (f32.const 1) + (f32.abs (get_local $0) ) ) + (f32.const 0.5) ) ) ) ) ) + (set_local $5 + (f64.promote/f32 + (call $~lib/math/Rf + (get_local $0) + ) + ) + ) (set_local $0 (f32.demote/f64 (f64.sub @@ -2737,30 +2826,10 @@ (f64.mul (f64.const 2) (f64.add - (tee_local $3 - (f64.sqrt - (f64.promote/f32 - (tee_local $0 - (f32.mul - (f32.sub - (f32.const 1) - (f32.abs - (get_local $0) - ) - ) - (f32.const 0.5) - ) - ) - ) - ) - ) + (get_local $3) (f64.mul (get_local $3) - (f64.promote/f32 - (call $~lib/math/Rf - (get_local $0) - ) - ) + (get_local $5) ) ) ) @@ -2923,7 +2992,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.asinh + (call $~lib/bindings/Math/asinh (get_local $0) ) ) @@ -3432,7 +3501,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.atan + (call $~lib/bindings/Math/atan (get_local $0) ) ) @@ -3888,7 +3957,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.atanh + (call $~lib/bindings/Math/atanh (get_local $0) ) ) @@ -4362,7 +4431,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.atan2 + (call $~lib/bindings/Math/atan2 (get_local $0) (get_local $1) ) @@ -4894,7 +4963,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.cbrt + (call $~lib/bindings/Math/cbrt (get_local $0) ) ) @@ -5072,7 +5141,7 @@ (set_local $2 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.ceil + (call $~lib/bindings/Math/ceil (get_local $0) ) ) @@ -5856,7 +5925,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.cosh + (call $~lib/bindings/Math/cosh (get_local $0) ) ) @@ -6595,7 +6664,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.exp + (call $~lib/bindings/Math/exp (get_local $0) ) ) @@ -6630,7 +6699,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.expm1 + (call $~lib/bindings/Math/expm1 (get_local $0) ) ) @@ -6664,7 +6733,7 @@ (set_local $2 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.floor + (call $~lib/bindings/Math/floor (get_local $0) ) ) @@ -6973,7 +7042,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.hypot + (call $~lib/bindings/Math/hypot (get_local $0) (get_local $1) ) @@ -7179,7 +7248,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log (get_local $0) ) ) @@ -7537,7 +7606,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.log10 + (call $~lib/bindings/Math/log10 (get_local $0) ) ) @@ -7811,7 +7880,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.log1p + (call $~lib/bindings/Math/log1p (get_local $0) ) ) @@ -8157,7 +8226,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.log2 + (call $~lib/bindings/Math/log2 (get_local $0) ) ) @@ -8420,7 +8489,7 @@ (set_local $3 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.max + (call $~lib/bindings/Math/max (get_local $0) (get_local $1) ) @@ -8458,7 +8527,7 @@ (set_local $3 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.min + (call $~lib/bindings/Math/min (get_local $0) (get_local $1) ) @@ -8870,7 +8939,7 @@ (set_local $3 (call $std/math/check (tee_local $0 - (call $std/math/JSOp.mod + (call $std/math/mod (get_local $0) (get_local $1) ) @@ -10531,50 +10600,45 @@ (get_local $2) ) ) - (return - (f64.mul - (get_local $13) - (tee_local $2 - (if (result f64) - (i32.le_s - (i32.shr_s - (tee_local $8 - (i32.add - (i32.wrap/i64 - (i64.shr_u - (i64.reinterpret/f64 - (tee_local $2 + (set_local $2 + (if (result f64) + (i32.le_s + (i32.shr_s + (tee_local $8 + (i32.add + (i32.wrap/i64 + (i64.shr_u + (i64.reinterpret/f64 + (tee_local $2 + (f64.sub + (f64.const 1) + (f64.sub (f64.sub - (f64.const 1) - (f64.sub - (f64.sub - (f64.div - (f64.mul + (f64.div + (f64.mul + (get_local $2) + (tee_local $9 + (f64.sub (get_local $2) - (tee_local $9 - (f64.sub - (get_local $2) + (f64.mul + (get_local $3) + (f64.add + (f64.const 0.16666666666666602) (f64.mul (get_local $3) (f64.add - (f64.const 0.16666666666666602) + (f64.const -2.7777777777015593e-03) (f64.mul (get_local $3) (f64.add - (f64.const -2.7777777777015593e-03) + (f64.const 6.613756321437934e-05) (f64.mul (get_local $3) (f64.add - (f64.const 6.613756321437934e-05) + (f64.const -1.6533902205465252e-06) (f64.mul (get_local $3) - (f64.add - (f64.const -1.6533902205465252e-06) - (f64.mul - (get_local $3) - (f64.const 4.1381367970572385e-08) - ) - ) + (f64.const 4.1381367970572385e-08) ) ) ) @@ -10585,69 +10649,75 @@ ) ) ) - (f64.sub - (get_local $9) - (f64.const 2) - ) ) - (f64.add - (tee_local $0 - (f64.sub - (get_local $6) - (f64.sub - (get_local $2) - (get_local $16) - ) - ) - ) - (f64.mul + ) + (f64.sub + (get_local $9) + (f64.const 2) + ) + ) + (f64.add + (tee_local $0 + (f64.sub + (get_local $6) + (f64.sub (get_local $2) - (get_local $0) + (get_local $16) ) ) ) - (get_local $2) + (f64.mul + (get_local $2) + (get_local $0) + ) ) ) + (get_local $2) ) ) - (i64.const 32) ) ) - (i32.shl - (get_local $7) - (i32.const 20) - ) + (i64.const 32) ) ) - (i32.const 20) - ) - (i32.const 0) - ) - (call $~lib/math/NativeMath.scalbn - (get_local $2) - (get_local $7) - ) - (f64.reinterpret/i64 - (i64.or - (i64.and - (i64.reinterpret/f64 - (get_local $2) - ) - (i64.const 4294967295) - ) - (i64.shl - (i64.extend_s/i32 - (get_local $8) - ) - (i64.const 32) + (i32.shl + (get_local $7) + (i32.const 20) ) ) ) + (i32.const 20) + ) + (i32.const 0) + ) + (call $~lib/math/NativeMath.scalbn + (get_local $2) + (get_local $7) + ) + (f64.reinterpret/i64 + (i64.or + (i64.and + (i64.reinterpret/f64 + (get_local $2) + ) + (i64.const 4294967295) + ) + (i64.shl + (i64.extend_s/i32 + (get_local $8) + ) + (i64.const 32) + ) ) ) ) ) + (return + (f64.mul + (get_local $13) + (get_local $2) + ) + ) ) (return (f64.mul @@ -10683,7 +10753,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.pow + (call $~lib/bindings/Math/pow (get_local $0) (get_local $1) ) @@ -11764,48 +11834,43 @@ (get_local $2) ) ) - (return - (f32.mul - (get_local $10) - (tee_local $2 - (if (result f32) - (i32.le_s - (i32.shr_s - (tee_local $8 - (i32.add - (i32.reinterpret/f32 - (tee_local $2 + (set_local $2 + (if (result f32) + (i32.le_s + (i32.shr_s + (tee_local $8 + (i32.add + (i32.reinterpret/f32 + (tee_local $2 + (f32.sub + (f32.const 1) + (f32.sub (f32.sub - (f32.const 1) - (f32.sub - (f32.sub - (f32.div - (f32.mul + (f32.div + (f32.mul + (get_local $2) + (tee_local $11 + (f32.sub (get_local $2) - (tee_local $11 - (f32.sub - (get_local $2) + (f32.mul + (get_local $3) + (f32.add + (f32.const 0.1666666716337204) (f32.mul (get_local $3) (f32.add - (f32.const 0.1666666716337204) + (f32.const -2.7777778450399637e-03) (f32.mul (get_local $3) (f32.add - (f32.const -2.7777778450399637e-03) + (f32.const 6.61375597701408e-05) (f32.mul (get_local $3) (f32.add - (f32.const 6.61375597701408e-05) + (f32.const -1.6533901998627698e-06) (f32.mul (get_local $3) - (f32.add - (f32.const -1.6533901998627698e-06) - (f32.mul - (get_local $3) - (f32.const 4.138136944220605e-08) - ) - ) + (f32.const 4.138136944220605e-08) ) ) ) @@ -11816,51 +11881,57 @@ ) ) ) - (f32.sub - (get_local $11) - (f32.const 2) - ) ) - (f32.add - (tee_local $0 - (f32.sub - (get_local $16) - (f32.sub - (get_local $2) - (get_local $15) - ) - ) - ) - (f32.mul + ) + (f32.sub + (get_local $11) + (f32.const 2) + ) + ) + (f32.add + (tee_local $0 + (f32.sub + (get_local $16) + (f32.sub (get_local $2) - (get_local $0) + (get_local $15) ) ) ) - (get_local $2) + (f32.mul + (get_local $2) + (get_local $0) + ) ) ) + (get_local $2) ) ) - (i32.shl - (get_local $4) - (i32.const 23) - ) ) ) - (i32.const 23) + (i32.shl + (get_local $4) + (i32.const 23) + ) ) - (i32.const 0) - ) - (call $~lib/math/NativeMathf.scalbn - (get_local $2) - (get_local $4) - ) - (f32.reinterpret/i32 - (get_local $8) ) + (i32.const 23) ) + (i32.const 0) ) + (call $~lib/math/NativeMathf.scalbn + (get_local $2) + (get_local $4) + ) + (f32.reinterpret/i32 + (get_local $8) + ) + ) + ) + (return + (f32.mul + (get_local $10) + (get_local $2) ) ) ) @@ -11932,7 +12003,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 40) - (i32.const 1000) + (i32.const 955) (i32.const 4) ) (unreachable) @@ -11963,7 +12034,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 40) - (i32.const 1007) + (i32.const 962) (i32.const 24) ) (unreachable) @@ -12341,7 +12412,7 @@ (set_local $2 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.sign + (call $~lib/bindings/Math/sign (get_local $0) ) ) @@ -13401,15 +13472,21 @@ ) ) ) - (f64.mul + (set_local $0 (f64.mul (f64.const 2) (get_local $2) ) + ) + (set_local $1 (call $~lib/math/expo2 (get_local $1) ) ) + (f64.mul + (get_local $0) + (get_local $1) + ) ) (func $std/math/test_sinh (; 147 ;) (; has Stack IR ;) (type $FFFii) (param $0 f64) (param $1 f64) (param $2 f64) (param $3 i32) (result i32) (local $4 i32) @@ -13426,7 +13503,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.sinh + (call $~lib/bindings/Math/sinh (get_local $0) ) ) @@ -13533,15 +13610,21 @@ ) ) ) - (f32.mul + (set_local $0 (f32.mul (f32.const 2) (get_local $3) ) + ) + (set_local $1 (call $~lib/math/expo2f (get_local $1) ) ) + (f32.mul + (get_local $0) + (get_local $1) + ) ) (func $std/math/test_sinhf (; 149 ;) (; has Stack IR ;) (type $fffii) (param $0 f32) (param $1 f32) (param $2 f32) (param $3 i32) (result i32) (call $std/math/check @@ -13567,7 +13650,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.sqrt + (call $~lib/bindings/Math/sqrt (get_local $0) ) ) @@ -13727,7 +13810,7 @@ ) (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.tanh + (call $~lib/bindings/Math/tanh (get_local $0) ) ) @@ -13876,7 +13959,7 @@ (set_local $2 (call $std/math/check (tee_local $0 - (call $~lib/math/JSMath.trunc + (call $~lib/bindings/Math/trunc (get_local $0) ) ) @@ -14171,11 +14254,13 @@ (local $1 i32) (local $2 f64) (local $3 f32) + (local $4 i64) + (local $5 i64) (if (i32.eqz (call $std/math/check (f64.const 2.718281828459045) - (get_global $~lib/math/JSMath.E) + (get_global $~lib/bindings/Math/E) (f64.const 0) ) ) @@ -14193,7 +14278,7 @@ (i32.eqz (call $std/math/check (f64.const 0.6931471805599453) - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) (f64.const 0) ) ) @@ -14211,7 +14296,7 @@ (i32.eqz (call $std/math/check (f64.const 2.302585092994046) - (get_global $~lib/math/JSMath.LN10) + (get_global $~lib/bindings/Math/LN10) (f64.const 0) ) ) @@ -14229,7 +14314,7 @@ (i32.eqz (call $std/math/check (f64.const 1.4426950408889634) - (get_global $~lib/math/JSMath.LOG2E) + (get_global $~lib/bindings/Math/LOG2E) (f64.const 0) ) ) @@ -14247,7 +14332,7 @@ (i32.eqz (call $std/math/check (f64.const 3.141592653589793) - (get_global $~lib/math/JSMath.PI) + (get_global $~lib/bindings/Math/PI) (f64.const 0) ) ) @@ -14265,7 +14350,7 @@ (i32.eqz (call $std/math/check (f64.const 0.7071067811865476) - (get_global $~lib/math/JSMath.SQRT1_2) + (get_global $~lib/bindings/Math/SQRT1_2) (f64.const 0) ) ) @@ -14283,7 +14368,7 @@ (i32.eqz (call $std/math/check (f64.const 1.4142135623730951) - (get_global $~lib/math/JSMath.SQRT2) + (get_global $~lib/bindings/Math/SQRT2) (f64.const 0) ) ) @@ -14302,7 +14387,7 @@ (call $std/math/check (f32.const 2.7182817459106445) (f32.demote/f64 - (get_global $~lib/math/JSMath.E) + (get_global $~lib/bindings/Math/E) ) (f32.const 0) ) @@ -14322,7 +14407,7 @@ (call $std/math/check (f32.const 0.6931471824645996) (f32.demote/f64 - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) ) (f32.const 0) ) @@ -14342,7 +14427,7 @@ (call $std/math/check (f32.const 2.3025851249694824) (f32.demote/f64 - (get_global $~lib/math/JSMath.LN10) + (get_global $~lib/bindings/Math/LN10) ) (f32.const 0) ) @@ -14362,7 +14447,7 @@ (call $std/math/check (f32.const 1.4426950216293335) (f32.demote/f64 - (get_global $~lib/math/JSMath.LOG2E) + (get_global $~lib/bindings/Math/LOG2E) ) (f32.const 0) ) @@ -14382,7 +14467,7 @@ (call $std/math/check (f32.const 3.1415927410125732) (f32.demote/f64 - (get_global $~lib/math/JSMath.PI) + (get_global $~lib/bindings/Math/PI) ) (f32.const 0) ) @@ -14402,7 +14487,7 @@ (call $std/math/check (f32.const 0.7071067690849304) (f32.demote/f64 - (get_global $~lib/math/JSMath.SQRT1_2) + (get_global $~lib/bindings/Math/SQRT1_2) ) (f32.const 0) ) @@ -14422,7 +14507,7 @@ (call $std/math/check (f32.const 1.4142135381698608) (f32.demote/f64 - (get_global $~lib/math/JSMath.SQRT2) + (get_global $~lib/bindings/Math/SQRT2) ) (f32.const 0) ) @@ -36604,7 +36689,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 1998) + (i32.const 1996) (i32.const 0) ) (unreachable) @@ -36623,7 +36708,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 1999) + (i32.const 1997) (i32.const 0) ) (unreachable) @@ -36642,7 +36727,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2000) + (i32.const 1998) (i32.const 0) ) (unreachable) @@ -36661,7 +36746,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2001) + (i32.const 1999) (i32.const 0) ) (unreachable) @@ -36680,7 +36765,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2002) + (i32.const 2000) (i32.const 0) ) (unreachable) @@ -36699,7 +36784,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2003) + (i32.const 2001) (i32.const 0) ) (unreachable) @@ -36718,7 +36803,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2004) + (i32.const 2002) (i32.const 0) ) (unreachable) @@ -36737,7 +36822,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2005) + (i32.const 2003) (i32.const 0) ) (unreachable) @@ -36756,7 +36841,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2006) + (i32.const 2004) (i32.const 0) ) (unreachable) @@ -36775,7 +36860,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2007) + (i32.const 2005) (i32.const 0) ) (unreachable) @@ -36790,6 +36875,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2008) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -0) + (f64.const 1) + (f64.const -0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2009) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -36803,9 +36926,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0) + (f64.const -0.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (i32.const 0) ) ) @@ -36822,9 +36945,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0.5) (f64.const 1) - (f64.const 0.5) + (f64.const 1) + (f64.const 0) (i32.const 0) ) ) @@ -36841,9 +36964,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0.5) + (f64.const -1) (f64.const 1) - (f64.const -0.5) + (f64.const -0) (i32.const 0) ) ) @@ -36860,9 +36983,9 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const 1.5) (f64.const 1) - (f64.const 1) - (f64.const 0) + (f64.const 0.5) (i32.const 0) ) ) @@ -36879,9 +37002,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.const -1.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (i32.const 0) ) ) @@ -36898,9 +37021,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1.5) + (f64.const 2) (f64.const 1) - (f64.const 0.5) + (f64.const 0) (i32.const 0) ) ) @@ -36914,44 +37037,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -1.5) - (f64.const 1) - (f64.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2017) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 2) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2018) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -36965,7 +37050,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2019) + (i32.const 2017) (i32.const 0) ) (unreachable) @@ -36984,7 +37069,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2020) + (i32.const 2018) (i32.const 0) ) (unreachable) @@ -37003,7 +37088,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2021) + (i32.const 2019) (i32.const 0) ) (unreachable) @@ -37018,6 +37103,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2020) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0) + (f64.const -1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2021) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -0) + (f64.const -1) + (f64.const -0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -37031,9 +37154,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0) + (f64.const 0.5) (f64.const -1) - (f64.const 0) + (f64.const 0.5) (i32.const 0) ) ) @@ -37050,9 +37173,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0) + (f64.const -0.5) (f64.const -1) - (f64.const -0) + (f64.const -0.5) (i32.const 0) ) ) @@ -37066,44 +37189,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2025) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2026) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -37117,7 +37202,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2027) + (i32.const 2025) (i32.const 0) ) (unreachable) @@ -37136,7 +37221,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2028) + (i32.const 2026) (i32.const 0) ) (unreachable) @@ -37155,7 +37240,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2029) + (i32.const 2027) (i32.const 0) ) (unreachable) @@ -37174,7 +37259,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2030) + (i32.const 2028) (i32.const 0) ) (unreachable) @@ -37193,7 +37278,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2031) + (i32.const 2029) (i32.const 0) ) (unreachable) @@ -37212,7 +37297,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2032) + (i32.const 2030) (i32.const 0) ) (unreachable) @@ -37231,7 +37316,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2033) + (i32.const 2031) (i32.const 0) ) (unreachable) @@ -37246,6 +37331,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2032) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const nan:0x8000000000000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2033) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -37259,10 +37382,10 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) - (f64.const -1) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -37279,9 +37402,9 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) + (f64.const inf) (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -37298,9 +37421,9 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -inf) + (f64.const 0) + (i32.const 0) ) ) (block @@ -37317,8 +37440,8 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (i32.const 0) ) ) @@ -37335,10 +37458,10 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const -0) (f64.const 0) - (f64.const -inf) - (f64.const 0) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -37354,10 +37477,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0) + (f64.const -0) + (f64.const -0) (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -37370,44 +37493,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2041) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2042) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -37421,7 +37506,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2043) + (i32.const 2041) (i32.const 0) ) (unreachable) @@ -37440,7 +37525,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2044) + (i32.const 2042) (i32.const 0) ) (unreachable) @@ -37459,7 +37544,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2045) + (i32.const 2043) (i32.const 0) ) (unreachable) @@ -37474,6 +37559,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2044) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -1) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2045) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -37487,7 +37610,7 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.const -inf) (f64.const 0) (f64.const nan:0x8000000000000) (i32.const 2) @@ -37506,10 +37629,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (f64.const nan:0x8000000000000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -37522,44 +37645,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -inf) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2049) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const nan:0x8000000000000) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2050) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -37573,7 +37658,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2051) + (i32.const 2049) (i32.const 0) ) (unreachable) @@ -37592,7 +37677,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2052) + (i32.const 2050) (i32.const 0) ) (unreachable) @@ -37607,6 +37692,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2051) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const nan:0x8000000000000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2052) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const inf) + (f64.const 2) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -37620,10 +37743,10 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -37640,9 +37763,9 @@ (i32.eqz (call $std/math/test_mod (f64.const inf) - (f64.const 2) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -37658,8 +37781,8 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const -0.5) + (f64.const -inf) + (f64.const 2) (f64.const nan:0x8000000000000) (i32.const 2) ) @@ -37677,10 +37800,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) + (f64.const -inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -37697,9 +37820,9 @@ (i32.eqz (call $std/math/test_mod (f64.const -inf) - (f64.const 2) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -37715,10 +37838,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -inf) - (f64.const -0.5) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -37734,7 +37857,7 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -inf) + (f64.const 1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (i32.const 0) @@ -37753,7 +37876,7 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (i32.const 0) @@ -37773,8 +37896,8 @@ (i32.eqz (call $std/math/test_mod (f64.const 1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const 1) (i32.const 0) ) ) @@ -37792,8 +37915,8 @@ (i32.eqz (call $std/math/test_mod (f64.const -1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const -1) (i32.const 0) ) ) @@ -37810,10 +37933,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1) (f64.const inf) - (f64.const 1) - (i32.const 0) + (f64.const inf) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -37829,10 +37952,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.const -inf) (f64.const inf) - (f64.const -1) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -37848,10 +37971,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const 1) + (f64.const -inf) + (f64.const 1) + (i32.const 0) ) ) (block @@ -37867,10 +37990,10 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const -1) (f64.const -inf) - (f64.const inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -1) + (i32.const 0) ) ) (block @@ -37886,10 +38009,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1) + (f64.const inf) (f64.const -inf) - (f64.const 1) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -37905,10 +38028,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) (f64.const -inf) - (f64.const -1) - (i32.const 0) + (f64.const -inf) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -37924,10 +38047,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const -inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const 1.75) + (f64.const 0.5) + (f64.const 0.25) + (i32.const 0) ) ) (block @@ -37943,10 +38066,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -inf) - (f64.const -inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -1.75) + (f64.const 0.5) + (f64.const -0.25) + (i32.const 0) ) ) (block @@ -37963,7 +38086,7 @@ (i32.eqz (call $std/math/test_mod (f64.const 1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const 0.25) (i32.const 0) ) @@ -37982,7 +38105,7 @@ (i32.eqz (call $std/math/test_mod (f64.const -1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const -0.25) (i32.const 0) ) @@ -37997,44 +38120,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 1.75) - (f64.const -0.5) - (f64.const 0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2074) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -1.75) - (f64.const -0.5) - (f64.const -0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2075) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -38048,7 +38133,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2084) + (i32.const 2082) (i32.const 0) ) (unreachable) @@ -38067,7 +38152,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2085) + (i32.const 2083) (i32.const 0) ) (unreachable) @@ -38086,7 +38171,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2086) + (i32.const 2084) (i32.const 0) ) (unreachable) @@ -38105,7 +38190,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2087) + (i32.const 2085) (i32.const 0) ) (unreachable) @@ -38124,7 +38209,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2088) + (i32.const 2086) (i32.const 0) ) (unreachable) @@ -38143,7 +38228,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2089) + (i32.const 2087) (i32.const 0) ) (unreachable) @@ -38162,7 +38247,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2090) + (i32.const 2088) (i32.const 0) ) (unreachable) @@ -38181,7 +38266,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2091) + (i32.const 2089) (i32.const 0) ) (unreachable) @@ -38200,7 +38285,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2092) + (i32.const 2090) (i32.const 0) ) (unreachable) @@ -38219,7 +38304,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2093) + (i32.const 2091) (i32.const 0) ) (unreachable) @@ -38234,6 +38319,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2094) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -0) + (f32.const 1) + (f32.const -0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2095) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -38247,9 +38370,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0) + (f32.const -0.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (i32.const 0) ) ) @@ -38266,9 +38389,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0.5) (f32.const 1) - (f32.const 0.5) + (f32.const 1) + (f32.const 0) (i32.const 0) ) ) @@ -38285,9 +38408,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0.5) + (f32.const -1) (f32.const 1) - (f32.const -0.5) + (f32.const -0) (i32.const 0) ) ) @@ -38304,9 +38427,9 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const 1.5) (f32.const 1) - (f32.const 1) - (f32.const 0) + (f32.const 0.5) (i32.const 0) ) ) @@ -38323,9 +38446,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.const -1.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (i32.const 0) ) ) @@ -38342,9 +38465,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1.5) + (f32.const 2) (f32.const 1) - (f32.const 0.5) + (f32.const 0) (i32.const 0) ) ) @@ -38358,44 +38481,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -1.5) - (f32.const 1) - (f32.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2103) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 2) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2104) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -38409,7 +38494,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2105) + (i32.const 2103) (i32.const 0) ) (unreachable) @@ -38428,7 +38513,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2106) + (i32.const 2104) (i32.const 0) ) (unreachable) @@ -38447,7 +38532,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2107) + (i32.const 2105) (i32.const 0) ) (unreachable) @@ -38462,6 +38547,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2106) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0) + (f32.const -1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2107) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -0) + (f32.const -1) + (f32.const -0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -38475,9 +38598,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0) + (f32.const 0.5) (f32.const -1) - (f32.const 0) + (f32.const 0.5) (i32.const 0) ) ) @@ -38494,9 +38617,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0) + (f32.const -0.5) (f32.const -1) - (f32.const -0) + (f32.const -0.5) (i32.const 0) ) ) @@ -38510,44 +38633,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2111) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2112) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -38561,7 +38646,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2113) + (i32.const 2111) (i32.const 0) ) (unreachable) @@ -38580,7 +38665,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2114) + (i32.const 2112) (i32.const 0) ) (unreachable) @@ -38599,7 +38684,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2115) + (i32.const 2113) (i32.const 0) ) (unreachable) @@ -38618,7 +38703,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2116) + (i32.const 2114) (i32.const 0) ) (unreachable) @@ -38637,7 +38722,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2117) + (i32.const 2115) (i32.const 0) ) (unreachable) @@ -38656,7 +38741,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2118) + (i32.const 2116) (i32.const 0) ) (unreachable) @@ -38675,7 +38760,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2119) + (i32.const 2117) (i32.const 0) ) (unreachable) @@ -38690,6 +38775,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2118) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const nan:0x400000) + (f32.const -1) + (f32.const nan:0x400000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2119) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -38703,10 +38826,10 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) - (f32.const -1) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -38723,9 +38846,9 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) + (f32.const inf) (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -38742,9 +38865,9 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -inf) + (f32.const 0) + (i32.const 0) ) ) (block @@ -38761,8 +38884,8 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (i32.const 0) ) ) @@ -38779,10 +38902,10 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const -0) (f32.const 0) - (f32.const -inf) - (f32.const 0) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -38798,10 +38921,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0) + (f32.const -0) + (f32.const -0) (f32.const nan:0x400000) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -38814,44 +38937,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2127) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2128) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -38865,7 +38950,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2129) + (i32.const 2127) (i32.const 0) ) (unreachable) @@ -38884,7 +38969,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2130) + (i32.const 2128) (i32.const 0) ) (unreachable) @@ -38903,7 +38988,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2131) + (i32.const 2129) (i32.const 0) ) (unreachable) @@ -38918,6 +39003,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2130) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -1) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2131) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -38931,7 +39054,7 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.const -inf) (f32.const 0) (f32.const nan:0x400000) (i32.const 2) @@ -38950,10 +39073,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (f32.const nan:0x400000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -38966,44 +39089,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -inf) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2135) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const nan:0x400000) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2136) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -39017,7 +39102,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2137) + (i32.const 2135) (i32.const 0) ) (unreachable) @@ -39036,7 +39121,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2138) + (i32.const 2136) (i32.const 0) ) (unreachable) @@ -39051,6 +39136,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2137) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const nan:0x400000) + (f32.const -0) + (f32.const nan:0x400000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2138) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const inf) + (f32.const 2) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -39064,10 +39187,10 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const inf) + (f32.const -0.5) (f32.const nan:0x400000) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -39084,9 +39207,9 @@ (i32.eqz (call $std/math/test_modf (f32.const inf) - (f32.const 2) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -39102,8 +39225,8 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const -0.5) + (f32.const -inf) + (f32.const 2) (f32.const nan:0x400000) (i32.const 2) ) @@ -39121,10 +39244,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) + (f32.const -inf) + (f32.const -0.5) (f32.const nan:0x400000) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -39141,9 +39264,9 @@ (i32.eqz (call $std/math/test_modf (f32.const -inf) - (f32.const 2) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -39159,10 +39282,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -inf) - (f32.const -0.5) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -39178,7 +39301,7 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -inf) + (f32.const 1) (f32.const nan:0x400000) (f32.const nan:0x400000) (i32.const 0) @@ -39197,7 +39320,7 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const nan:0x400000) + (f32.const -1) (f32.const nan:0x400000) (f32.const nan:0x400000) (i32.const 0) @@ -39217,8 +39340,8 @@ (i32.eqz (call $std/math/test_modf (f32.const 1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const 1) (i32.const 0) ) ) @@ -39236,8 +39359,8 @@ (i32.eqz (call $std/math/test_modf (f32.const -1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const -1) (i32.const 0) ) ) @@ -39254,10 +39377,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1) (f32.const inf) - (f32.const 1) - (i32.const 0) + (f32.const inf) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -39273,10 +39396,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.const -inf) (f32.const inf) - (f32.const -1) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -39292,10 +39415,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const 1) + (f32.const -inf) + (f32.const 1) + (i32.const 0) ) ) (block @@ -39311,10 +39434,10 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const -1) (f32.const -inf) - (f32.const inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -1) + (i32.const 0) ) ) (block @@ -39330,10 +39453,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1) + (f32.const inf) (f32.const -inf) - (f32.const 1) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -39349,10 +39472,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) (f32.const -inf) - (f32.const -1) - (i32.const 0) + (f32.const -inf) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -39368,10 +39491,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const -inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const 1.75) + (f32.const 0.5) + (f32.const 0.25) + (i32.const 0) ) ) (block @@ -39387,10 +39510,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -inf) - (f32.const -inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -1.75) + (f32.const 0.5) + (f32.const -0.25) + (i32.const 0) ) ) (block @@ -39407,7 +39530,7 @@ (i32.eqz (call $std/math/test_modf (f32.const 1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const 0.25) (i32.const 0) ) @@ -39426,7 +39549,7 @@ (i32.eqz (call $std/math/test_modf (f32.const -1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const -0.25) (i32.const 0) ) @@ -39441,44 +39564,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 1.75) - (f32.const -0.5) - (f32.const 0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2160) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -1.75) - (f32.const -0.5) - (f32.const -0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2161) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -39493,7 +39578,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2173) + (i32.const 2171) (i32.const 0) ) (unreachable) @@ -39513,7 +39598,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2174) + (i32.const 2172) (i32.const 0) ) (unreachable) @@ -39533,7 +39618,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2175) + (i32.const 2173) (i32.const 0) ) (unreachable) @@ -39553,7 +39638,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2176) + (i32.const 2174) (i32.const 0) ) (unreachable) @@ -39573,7 +39658,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2177) + (i32.const 2175) (i32.const 0) ) (unreachable) @@ -39593,7 +39678,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2178) + (i32.const 2176) (i32.const 0) ) (unreachable) @@ -39613,7 +39698,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2179) + (i32.const 2177) (i32.const 0) ) (unreachable) @@ -39633,7 +39718,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2180) + (i32.const 2178) (i32.const 0) ) (unreachable) @@ -39653,7 +39738,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2181) + (i32.const 2179) (i32.const 0) ) (unreachable) @@ -39673,7 +39758,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2182) + (i32.const 2180) (i32.const 0) ) (unreachable) @@ -39693,7 +39778,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2185) + (i32.const 2183) (i32.const 0) ) (unreachable) @@ -39709,6 +39794,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2184) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0) + (f64.const 3) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2185) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0) + (f64.const 2) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -39723,7 +39848,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const 3) + (f64.const 1) (f64.const 0) (f64.const 0) (i32.const 0) @@ -39743,7 +39868,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const 2) + (f64.const 0.5) (f64.const 0) (f64.const 0) (i32.const 0) @@ -39763,8 +39888,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const 1) (f64.const 0) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -39779,46 +39904,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 0) - (f64.const 0.5) - (f64.const 0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2190) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 0) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2191) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -39833,7 +39918,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2192) + (i32.const 2190) (i32.const 0) ) (unreachable) @@ -39849,6 +39934,46 @@ (i32.const 4) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2191) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0) + (f64.const -1) + (f64.const inf) + (f64.const 0) + (i32.const 4) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2192) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0) + (f64.const -2) + (f64.const inf) + (f64.const 0) + (i32.const 4) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -39863,7 +39988,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const -1) + (f64.const -3) (f64.const inf) (f64.const 0) (i32.const 4) @@ -39883,7 +40008,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const -2) + (f64.const -4) (f64.const inf) (f64.const 0) (i32.const 4) @@ -39903,10 +40028,10 @@ (i32.eqz (call $std/math/test_pow (f64.const 0) - (f64.const -3) + (f64.const -inf) (f64.const inf) (f64.const 0) - (i32.const 4) + (i32.const 0) ) ) (block @@ -39922,11 +40047,11 @@ (if (i32.eqz (call $std/math/test_pow + (f64.const -0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) - (f64.const -4) - (f64.const inf) - (f64.const 0) - (i32.const 4) + (i32.const 0) ) ) (block @@ -39942,10 +40067,10 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 0) - (f64.const -inf) + (f64.const -0) (f64.const inf) (f64.const 0) + (f64.const 0) (i32.const 0) ) ) @@ -39959,46 +40084,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2199) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const inf) - (f64.const 0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2200) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -40013,7 +40098,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2201) + (i32.const 2199) (i32.const 0) ) (unreachable) @@ -40033,7 +40118,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2202) + (i32.const 2200) (i32.const 0) ) (unreachable) @@ -40053,7 +40138,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2203) + (i32.const 2201) (i32.const 0) ) (unreachable) @@ -40069,6 +40154,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2202) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const 0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2203) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40079,46 +40204,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2205) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const -0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2206) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -40133,7 +40218,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2207) + (i32.const 2205) (i32.const 0) ) (unreachable) @@ -40153,7 +40238,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2208) + (i32.const 2206) (i32.const 0) ) (unreachable) @@ -40173,7 +40258,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2209) + (i32.const 2207) (i32.const 0) ) (unreachable) @@ -40193,7 +40278,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2210) + (i32.const 2208) (i32.const 0) ) (unreachable) @@ -40213,7 +40298,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2211) + (i32.const 2209) (i32.const 0) ) (unreachable) @@ -40233,7 +40318,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2212) + (i32.const 2210) (i32.const 0) ) (unreachable) @@ -40249,6 +40334,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2211) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const inf) + (f64.const 0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2212) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -inf) + (f64.const 0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40262,7 +40387,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const inf) + (f64.const 1) (f64.const 0) (f64.const 1) (f64.const 0) @@ -40282,7 +40407,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -inf) + (f64.const -1) (f64.const 0) (f64.const 1) (f64.const 0) @@ -40302,7 +40427,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1) + (f64.const -0.5) (f64.const 0) (f64.const 1) (f64.const 0) @@ -40319,46 +40444,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -1) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2217) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0.5) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2218) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -40373,7 +40458,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2219) + (i32.const 2217) (i32.const 0) ) (unreachable) @@ -40393,7 +40478,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2220) + (i32.const 2218) (i32.const 0) ) (unreachable) @@ -40413,7 +40498,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2221) + (i32.const 2219) (i32.const 0) ) (unreachable) @@ -40429,6 +40514,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2220) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -1) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2221) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0.5) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40443,8 +40568,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -0) - (f64.const 1) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -40462,9 +40587,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -0.5) - (f64.const -0) - (f64.const 1) + (f64.const -1) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -40483,7 +40608,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const nan:0x8000000000000) + (f64.const -inf) (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) @@ -40503,8 +40628,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 2) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -40523,8 +40648,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -inf) - (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -40543,7 +40668,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const 2) + (f64.const -2) (f64.const 1) (f64.const 0) (i32.const 0) @@ -40563,7 +40688,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -1) + (f64.const -3) (f64.const -1) (f64.const 0) (i32.const 0) @@ -40583,10 +40708,10 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -2) - (f64.const 1) + (f64.const 0.5) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (i32.const 2) ) ) (block @@ -40602,9 +40727,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -1) - (f64.const -3) - (f64.const -1) + (f64.const 1) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -40622,11 +40747,11 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -1) - (f64.const 0.5) + (f64.const 1) + (f64.const inf) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 2) + (i32.const 0) ) ) (block @@ -40643,7 +40768,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const nan:0x8000000000000) + (f64.const -inf) (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) @@ -40663,8 +40788,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 3) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -40683,8 +40808,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const -inf) - (f64.const nan:0x8000000000000) + (f64.const 0.5) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -40703,7 +40828,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const 3) + (f64.const -0.5) (f64.const 1) (f64.const 0) (i32.const 0) @@ -40719,46 +40844,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 1) - (f64.const 0.5) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2237) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 1) - (f64.const -0.5) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2238) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -40773,7 +40858,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2239) + (i32.const 2237) (i32.const 0) ) (unreachable) @@ -40793,7 +40878,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2240) + (i32.const 2238) (i32.const 0) ) (unreachable) @@ -40813,7 +40898,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2241) + (i32.const 2239) (i32.const 0) ) (unreachable) @@ -40833,7 +40918,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2242) + (i32.const 2240) (i32.const 0) ) (unreachable) @@ -40853,7 +40938,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2243) + (i32.const 2241) (i32.const 0) ) (unreachable) @@ -40873,7 +40958,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2244) + (i32.const 2242) (i32.const 0) ) (unreachable) @@ -40893,7 +40978,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2245) + (i32.const 2243) (i32.const 0) ) (unreachable) @@ -40909,6 +40994,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2244) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0.5) + (f64.const inf) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2245) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0.5) + (f64.const -inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40923,8 +41048,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 0.5) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -40942,8 +41067,8 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 0.5) - (f64.const -inf) + (f64.const 1.5) + (f64.const inf) (f64.const inf) (f64.const 0) (i32.const 0) @@ -40962,9 +41087,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 0.5) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const 1.5) + (f64.const -inf) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -40983,8 +41108,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1.5) - (f64.const inf) - (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -41002,9 +41127,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1.5) - (f64.const -inf) - (f64.const 0) + (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -41022,9 +41147,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1.5) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const inf) + (f64.const inf) (f64.const 0) (i32.const 0) ) @@ -41043,8 +41168,8 @@ (i32.eqz (call $std/math/test_pow (f64.const inf) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const -inf) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -41063,7 +41188,7 @@ (i32.eqz (call $std/math/test_pow (f64.const inf) - (f64.const inf) + (f64.const 3) (f64.const inf) (f64.const 0) (i32.const 0) @@ -41083,8 +41208,8 @@ (i32.eqz (call $std/math/test_pow (f64.const inf) - (f64.const -inf) - (f64.const 0) + (f64.const 2) + (f64.const inf) (f64.const 0) (i32.const 0) ) @@ -41103,7 +41228,7 @@ (i32.eqz (call $std/math/test_pow (f64.const inf) - (f64.const 3) + (f64.const 1) (f64.const inf) (f64.const 0) (i32.const 0) @@ -41123,7 +41248,7 @@ (i32.eqz (call $std/math/test_pow (f64.const inf) - (f64.const 2) + (f64.const 0.5) (f64.const inf) (f64.const 0) (i32.const 0) @@ -41139,46 +41264,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const inf) - (f64.const 1) - (f64.const inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2258) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const inf) - (f64.const 0.5) - (f64.const inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2259) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -41193,7 +41278,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2260) + (i32.const 2258) (i32.const 0) ) (unreachable) @@ -41213,7 +41298,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2261) + (i32.const 2259) (i32.const 0) ) (unreachable) @@ -41229,6 +41314,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2260) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2261) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -inf) + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41243,8 +41368,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -inf) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const -inf) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -41259,46 +41384,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -inf) - (f64.const inf) - (f64.const inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2264) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -inf) - (f64.const -inf) - (f64.const 0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2265) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -41313,7 +41398,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2266) + (i32.const 2264) (i32.const 0) ) (unreachable) @@ -41333,7 +41418,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2267) + (i32.const 2265) (i32.const 0) ) (unreachable) @@ -41353,7 +41438,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2268) + (i32.const 2266) (i32.const 0) ) (unreachable) @@ -41373,7 +41458,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2269) + (i32.const 2267) (i32.const 0) ) (unreachable) @@ -41393,7 +41478,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2270) + (i32.const 2268) (i32.const 0) ) (unreachable) @@ -41413,7 +41498,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2271) + (i32.const 2269) (i32.const 0) ) (unreachable) @@ -41433,7 +41518,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2272) + (i32.const 2270) (i32.const 0) ) (unreachable) @@ -41453,7 +41538,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2273) + (i32.const 2271) (i32.const 0) ) (unreachable) @@ -41473,7 +41558,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2274) + (i32.const 2272) (i32.const 0) ) (unreachable) @@ -41493,7 +41578,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2275) + (i32.const 2273) (i32.const 0) ) (unreachable) @@ -41513,7 +41598,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2276) + (i32.const 2274) (i32.const 0) ) (unreachable) @@ -41533,7 +41618,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2285) + (i32.const 2283) (i32.const 0) ) (unreachable) @@ -41553,7 +41638,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2286) + (i32.const 2284) (i32.const 0) ) (unreachable) @@ -41573,7 +41658,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2287) + (i32.const 2285) (i32.const 0) ) (unreachable) @@ -41593,7 +41678,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2288) + (i32.const 2286) (i32.const 0) ) (unreachable) @@ -41613,7 +41698,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2289) + (i32.const 2287) (i32.const 0) ) (unreachable) @@ -41633,7 +41718,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2290) + (i32.const 2288) (i32.const 0) ) (unreachable) @@ -41653,7 +41738,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2291) + (i32.const 2289) (i32.const 0) ) (unreachable) @@ -41673,7 +41758,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2292) + (i32.const 2290) (i32.const 0) ) (unreachable) @@ -41693,7 +41778,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2293) + (i32.const 2291) (i32.const 0) ) (unreachable) @@ -41713,7 +41798,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2294) + (i32.const 2292) (i32.const 0) ) (unreachable) @@ -41733,7 +41818,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2297) + (i32.const 2295) (i32.const 0) ) (unreachable) @@ -41749,6 +41834,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2296) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0) + (f32.const 3) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2297) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0) + (f32.const 2) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41763,7 +41888,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const 3) + (f32.const 1) (f32.const 0) (f32.const 0) (i32.const 0) @@ -41783,7 +41908,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const 2) + (f32.const 0.5) (f32.const 0) (f32.const 0) (i32.const 0) @@ -41803,8 +41928,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const 1) (f32.const 0) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -41819,46 +41944,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 0) - (f32.const 0.5) - (f32.const 0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2302) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 0) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2303) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -41873,7 +41958,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2304) + (i32.const 2302) (i32.const 0) ) (unreachable) @@ -41889,6 +41974,46 @@ (i32.const 4) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2303) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0) + (f32.const -1) + (f32.const inf) + (f32.const 0) + (i32.const 4) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2304) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0) + (f32.const -2) + (f32.const inf) + (f32.const 0) + (i32.const 4) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41903,7 +42028,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const -1) + (f32.const -3) (f32.const inf) (f32.const 0) (i32.const 4) @@ -41923,7 +42048,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const -2) + (f32.const -4) (f32.const inf) (f32.const 0) (i32.const 4) @@ -41943,10 +42068,10 @@ (i32.eqz (call $std/math/test_powf (f32.const 0) - (f32.const -3) + (f32.const -inf) (f32.const inf) (f32.const 0) - (i32.const 4) + (i32.const 0) ) ) (block @@ -41962,11 +42087,11 @@ (if (i32.eqz (call $std/math/test_powf + (f32.const -0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) - (f32.const -4) - (f32.const inf) - (f32.const 0) - (i32.const 4) + (i32.const 0) ) ) (block @@ -41982,10 +42107,10 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 0) - (f32.const -inf) + (f32.const -0) (f32.const inf) (f32.const 0) + (f32.const 0) (i32.const 0) ) ) @@ -41999,46 +42124,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2311) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const inf) - (f32.const 0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2312) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -42053,7 +42138,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2313) + (i32.const 2311) (i32.const 0) ) (unreachable) @@ -42073,7 +42158,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2314) + (i32.const 2312) (i32.const 0) ) (unreachable) @@ -42093,7 +42178,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2315) + (i32.const 2313) (i32.const 0) ) (unreachable) @@ -42109,6 +42194,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2314) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const 0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2315) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42119,46 +42244,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2317) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const -0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2318) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -42173,7 +42258,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2319) + (i32.const 2317) (i32.const 0) ) (unreachable) @@ -42193,7 +42278,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2320) + (i32.const 2318) (i32.const 0) ) (unreachable) @@ -42213,7 +42298,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2321) + (i32.const 2319) (i32.const 0) ) (unreachable) @@ -42233,7 +42318,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2322) + (i32.const 2320) (i32.const 0) ) (unreachable) @@ -42253,7 +42338,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2323) + (i32.const 2321) (i32.const 0) ) (unreachable) @@ -42273,7 +42358,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2324) + (i32.const 2322) (i32.const 0) ) (unreachable) @@ -42289,6 +42374,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2323) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const inf) + (f32.const 0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2324) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -inf) + (f32.const 0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42302,7 +42427,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const inf) + (f32.const 1) (f32.const 0) (f32.const 1) (f32.const 0) @@ -42322,7 +42447,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -inf) + (f32.const -1) (f32.const 0) (f32.const 1) (f32.const 0) @@ -42342,7 +42467,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1) + (f32.const -0.5) (f32.const 0) (f32.const 1) (f32.const 0) @@ -42359,46 +42484,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -1) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2329) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0.5) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2330) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -42413,7 +42498,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2331) + (i32.const 2329) (i32.const 0) ) (unreachable) @@ -42433,7 +42518,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2332) + (i32.const 2330) (i32.const 0) ) (unreachable) @@ -42453,7 +42538,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2333) + (i32.const 2331) (i32.const 0) ) (unreachable) @@ -42469,6 +42554,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2332) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -1) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2333) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0.5) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42483,8 +42608,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -0) - (f32.const 1) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -42502,9 +42627,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -0.5) - (f32.const -0) - (f32.const 1) + (f32.const -1) + (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -42523,7 +42648,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const nan:0x400000) + (f32.const -inf) (f32.const nan:0x400000) (f32.const 0) (i32.const 0) @@ -42543,8 +42668,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 2) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -42563,8 +42688,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -inf) - (f32.const nan:0x400000) + (f32.const -1) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -42583,7 +42708,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const 2) + (f32.const -2) (f32.const 1) (f32.const 0) (i32.const 0) @@ -42603,7 +42728,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -1) + (f32.const -3) (f32.const -1) (f32.const 0) (i32.const 0) @@ -42623,10 +42748,10 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -2) - (f32.const 1) + (f32.const 0.5) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (i32.const 2) ) ) (block @@ -42642,9 +42767,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -1) - (f32.const -3) - (f32.const -1) + (f32.const 1) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -42662,11 +42787,11 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -1) - (f32.const 0.5) + (f32.const 1) + (f32.const inf) (f32.const nan:0x400000) (f32.const 0) - (i32.const 2) + (i32.const 0) ) ) (block @@ -42683,7 +42808,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const nan:0x400000) + (f32.const -inf) (f32.const nan:0x400000) (f32.const 0) (i32.const 0) @@ -42703,8 +42828,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 3) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -42723,8 +42848,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const -inf) - (f32.const nan:0x400000) + (f32.const 0.5) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -42743,7 +42868,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const 3) + (f32.const -0.5) (f32.const 1) (f32.const 0) (i32.const 0) @@ -42759,46 +42884,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 1) - (f32.const 0.5) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2349) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 1) - (f32.const -0.5) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2350) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -42813,7 +42898,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2351) + (i32.const 2349) (i32.const 0) ) (unreachable) @@ -42833,7 +42918,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2352) + (i32.const 2350) (i32.const 0) ) (unreachable) @@ -42853,7 +42938,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2353) + (i32.const 2351) (i32.const 0) ) (unreachable) @@ -42873,7 +42958,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2354) + (i32.const 2352) (i32.const 0) ) (unreachable) @@ -42893,7 +42978,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2355) + (i32.const 2353) (i32.const 0) ) (unreachable) @@ -42913,7 +42998,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2356) + (i32.const 2354) (i32.const 0) ) (unreachable) @@ -42933,7 +43018,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2357) + (i32.const 2355) (i32.const 0) ) (unreachable) @@ -42949,6 +43034,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2356) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0.5) + (f32.const inf) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2357) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0.5) + (f32.const -inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42963,8 +43088,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 0.5) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -42982,8 +43107,8 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 0.5) - (f32.const -inf) + (f32.const 1.5) + (f32.const inf) (f32.const inf) (f32.const 0) (i32.const 0) @@ -43002,9 +43127,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 0.5) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const 1.5) + (f32.const -inf) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -43023,8 +43148,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1.5) - (f32.const inf) - (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -43042,9 +43167,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1.5) - (f32.const -inf) - (f32.const 0) + (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -43062,9 +43187,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1.5) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const inf) + (f32.const inf) (f32.const 0) (i32.const 0) ) @@ -43083,8 +43208,8 @@ (i32.eqz (call $std/math/test_powf (f32.const inf) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const -inf) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -43103,7 +43228,7 @@ (i32.eqz (call $std/math/test_powf (f32.const inf) - (f32.const inf) + (f32.const 3) (f32.const inf) (f32.const 0) (i32.const 0) @@ -43123,8 +43248,8 @@ (i32.eqz (call $std/math/test_powf (f32.const inf) - (f32.const -inf) - (f32.const 0) + (f32.const 2) + (f32.const inf) (f32.const 0) (i32.const 0) ) @@ -43143,7 +43268,7 @@ (i32.eqz (call $std/math/test_powf (f32.const inf) - (f32.const 3) + (f32.const 1) (f32.const inf) (f32.const 0) (i32.const 0) @@ -43163,7 +43288,7 @@ (i32.eqz (call $std/math/test_powf (f32.const inf) - (f32.const 2) + (f32.const 0.5) (f32.const inf) (f32.const 0) (i32.const 0) @@ -43179,46 +43304,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const inf) - (f32.const 1) - (f32.const inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2370) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const inf) - (f32.const 0.5) - (f32.const inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2371) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -43233,7 +43318,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2372) + (i32.const 2370) (i32.const 0) ) (unreachable) @@ -43253,7 +43338,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2373) + (i32.const 2371) (i32.const 0) ) (unreachable) @@ -43269,6 +43354,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2372) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2373) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -inf) + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -43283,8 +43408,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -inf) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const -inf) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -43299,46 +43424,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -inf) - (f32.const inf) - (f32.const inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2376) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -inf) - (f32.const -inf) - (f32.const 0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2377) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -43353,7 +43438,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2378) + (i32.const 2376) (i32.const 0) ) (unreachable) @@ -43373,7 +43458,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2379) + (i32.const 2377) (i32.const 0) ) (unreachable) @@ -43393,7 +43478,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2380) + (i32.const 2378) (i32.const 0) ) (unreachable) @@ -43413,7 +43498,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2381) + (i32.const 2379) (i32.const 0) ) (unreachable) @@ -43433,7 +43518,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2382) + (i32.const 2380) (i32.const 0) ) (unreachable) @@ -43453,7 +43538,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2383) + (i32.const 2381) (i32.const 0) ) (unreachable) @@ -43473,7 +43558,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2384) + (i32.const 2382) (i32.const 0) ) (unreachable) @@ -43493,7 +43578,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2385) + (i32.const 2383) (i32.const 0) ) (unreachable) @@ -43513,7 +43598,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2386) + (i32.const 2384) (i32.const 0) ) (unreachable) @@ -43533,7 +43618,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2387) + (i32.const 2385) (i32.const 0) ) (unreachable) @@ -43553,7 +43638,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2388) + (i32.const 2386) (i32.const 0) ) (unreachable) @@ -43561,7 +43646,7 @@ ) (call $~lib/math/NativeMath.seedRandom (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (block $break|0 @@ -43607,7 +43692,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2397) + (i32.const 2395) (i32.const 2) ) (unreachable) @@ -43617,7 +43702,7 @@ ) (call $~lib/math/NativeMath.seedRandom (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (block $break|1 @@ -43666,7 +43751,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2405) + (i32.const 2403) (i32.const 2) ) (unreachable) @@ -43686,7 +43771,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2419) + (i32.const 2417) (i32.const 0) ) (unreachable) @@ -43704,7 +43789,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2420) + (i32.const 2418) (i32.const 0) ) (unreachable) @@ -43722,7 +43807,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2421) + (i32.const 2419) (i32.const 0) ) (unreachable) @@ -43740,7 +43825,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2422) + (i32.const 2420) (i32.const 0) ) (unreachable) @@ -43758,7 +43843,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2423) + (i32.const 2421) (i32.const 0) ) (unreachable) @@ -43776,7 +43861,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2424) + (i32.const 2422) (i32.const 0) ) (unreachable) @@ -43794,7 +43879,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2425) + (i32.const 2423) (i32.const 0) ) (unreachable) @@ -43812,7 +43897,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2426) + (i32.const 2424) (i32.const 0) ) (unreachable) @@ -43830,7 +43915,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2427) + (i32.const 2425) (i32.const 0) ) (unreachable) @@ -43848,7 +43933,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2428) + (i32.const 2426) (i32.const 0) ) (unreachable) @@ -43862,6 +43947,42 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2429) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_round + (f64.const inf) + (f64.const inf) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2430) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_round + (f64.const -inf) + (f64.const -inf) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -43875,8 +43996,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const inf) - (f64.const inf) + (f64.const 0) + (f64.const 0) (i32.const 0) ) ) @@ -43893,8 +44014,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const -inf) - (f64.const -inf) + (f64.const -0) + (f64.const -0) (i32.const 0) ) ) @@ -43911,8 +44032,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (i32.const 0) ) ) @@ -43929,8 +44050,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const -0) - (f64.const -0) + (f64.const -1) + (f64.const -1) (i32.const 0) ) ) @@ -43944,42 +44065,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_round - (f64.const 1) - (f64.const 1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2436) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_round - (f64.const -1) - (f64.const -1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2437) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_round @@ -43992,7 +44077,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2438) + (i32.const 2436) (i32.const 0) ) (unreachable) @@ -44010,7 +44095,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2439) + (i32.const 2437) (i32.const 0) ) (unreachable) @@ -44028,7 +44113,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2440) + (i32.const 2438) (i32.const 0) ) (unreachable) @@ -44046,7 +44131,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2441) + (i32.const 2439) (i32.const 0) ) (unreachable) @@ -44064,7 +44149,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2442) + (i32.const 2440) (i32.const 0) ) (unreachable) @@ -44082,7 +44167,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2443) + (i32.const 2441) (i32.const 0) ) (unreachable) @@ -44100,7 +44185,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2444) + (i32.const 2442) (i32.const 0) ) (unreachable) @@ -44118,7 +44203,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2445) + (i32.const 2443) (i32.const 0) ) (unreachable) @@ -44136,7 +44221,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2446) + (i32.const 2444) (i32.const 0) ) (unreachable) @@ -44154,7 +44239,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2447) + (i32.const 2445) (i32.const 0) ) (unreachable) @@ -44172,7 +44257,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2456) + (i32.const 2454) (i32.const 0) ) (unreachable) @@ -44190,7 +44275,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2457) + (i32.const 2455) (i32.const 0) ) (unreachable) @@ -44208,7 +44293,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2458) + (i32.const 2456) (i32.const 0) ) (unreachable) @@ -44226,7 +44311,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2459) + (i32.const 2457) (i32.const 0) ) (unreachable) @@ -44244,7 +44329,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2460) + (i32.const 2458) (i32.const 0) ) (unreachable) @@ -44262,7 +44347,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2461) + (i32.const 2459) (i32.const 0) ) (unreachable) @@ -44280,7 +44365,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2462) + (i32.const 2460) (i32.const 0) ) (unreachable) @@ -44298,7 +44383,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2463) + (i32.const 2461) (i32.const 0) ) (unreachable) @@ -44316,7 +44401,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2464) + (i32.const 2462) (i32.const 0) ) (unreachable) @@ -44334,7 +44419,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2465) + (i32.const 2463) (i32.const 0) ) (unreachable) @@ -44348,6 +44433,42 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2466) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_roundf + (f32.const inf) + (f32.const inf) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2467) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_roundf + (f32.const -inf) + (f32.const -inf) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -44361,8 +44482,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const inf) - (f32.const inf) + (f32.const 0) + (f32.const 0) (i32.const 0) ) ) @@ -44379,8 +44500,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const -inf) - (f32.const -inf) + (f32.const -0) + (f32.const -0) (i32.const 0) ) ) @@ -44397,8 +44518,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (i32.const 0) ) ) @@ -44415,8 +44536,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const -0) - (f32.const -0) + (f32.const -1) + (f32.const -1) (i32.const 0) ) ) @@ -44430,42 +44551,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_roundf - (f32.const 1) - (f32.const 1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2473) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_roundf - (f32.const -1) - (f32.const -1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2474) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_roundf @@ -44478,7 +44563,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2475) + (i32.const 2473) (i32.const 0) ) (unreachable) @@ -44496,7 +44581,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2476) + (i32.const 2474) (i32.const 0) ) (unreachable) @@ -44514,7 +44599,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2477) + (i32.const 2475) (i32.const 0) ) (unreachable) @@ -44532,7 +44617,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2478) + (i32.const 2476) (i32.const 0) ) (unreachable) @@ -44550,7 +44635,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2479) + (i32.const 2477) (i32.const 0) ) (unreachable) @@ -44568,7 +44653,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2480) + (i32.const 2478) (i32.const 0) ) (unreachable) @@ -44586,7 +44671,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2481) + (i32.const 2479) (i32.const 0) ) (unreachable) @@ -44604,7 +44689,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2482) + (i32.const 2480) (i32.const 0) ) (unreachable) @@ -44622,7 +44707,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2483) + (i32.const 2481) (i32.const 0) ) (unreachable) @@ -44640,7 +44725,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2484) + (i32.const 2482) (i32.const 0) ) (unreachable) @@ -44653,6 +44738,40 @@ (f64.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2493) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sign + (f64.const -0) + (f64.const -0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2494) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sign + (f64.const 1) + (f64.const 1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -44663,40 +44782,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sign - (f64.const -0) - (f64.const -0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2496) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sign - (f64.const 1) - (f64.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2497) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sign @@ -44708,7 +44793,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2498) + (i32.const 2496) (i32.const 0) ) (unreachable) @@ -44725,7 +44810,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2499) + (i32.const 2497) (i32.const 0) ) (unreachable) @@ -44742,7 +44827,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2500) + (i32.const 2498) (i32.const 0) ) (unreachable) @@ -44759,7 +44844,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2501) + (i32.const 2499) (i32.const 0) ) (unreachable) @@ -44776,7 +44861,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2502) + (i32.const 2500) (i32.const 0) ) (unreachable) @@ -44793,7 +44878,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2503) + (i32.const 2501) (i32.const 0) ) (unreachable) @@ -44806,6 +44891,40 @@ (f32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2509) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_signf + (f32.const -0) + (f32.const -0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2510) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_signf + (f32.const 1) + (f32.const 1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -44816,40 +44935,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_signf - (f32.const -0) - (f32.const -0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2512) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_signf - (f32.const 1) - (f32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2513) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_signf @@ -44861,7 +44946,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2514) + (i32.const 2512) (i32.const 0) ) (unreachable) @@ -44878,7 +44963,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2515) + (i32.const 2513) (i32.const 0) ) (unreachable) @@ -44895,7 +44980,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2516) + (i32.const 2514) (i32.const 0) ) (unreachable) @@ -44912,7 +44997,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2517) + (i32.const 2515) (i32.const 0) ) (unreachable) @@ -44929,7 +45014,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2518) + (i32.const 2516) (i32.const 0) ) (unreachable) @@ -44946,7 +45031,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2519) + (i32.const 2517) (i32.const 0) ) (unreachable) @@ -44965,7 +45050,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2530) + (i32.const 2528) (i32.const 0) ) (unreachable) @@ -44984,7 +45069,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2531) + (i32.const 2529) (i32.const 0) ) (unreachable) @@ -45003,7 +45088,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2532) + (i32.const 2530) (i32.const 0) ) (unreachable) @@ -45022,7 +45107,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2533) + (i32.const 2531) (i32.const 0) ) (unreachable) @@ -45041,7 +45126,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2534) + (i32.const 2532) (i32.const 0) ) (unreachable) @@ -45060,7 +45145,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2535) + (i32.const 2533) (i32.const 0) ) (unreachable) @@ -45079,7 +45164,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2536) + (i32.const 2534) (i32.const 0) ) (unreachable) @@ -45098,7 +45183,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2537) + (i32.const 2535) (i32.const 0) ) (unreachable) @@ -45117,7 +45202,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2538) + (i32.const 2536) (i32.const 0) ) (unreachable) @@ -45136,7 +45221,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2539) + (i32.const 2537) (i32.const 0) ) (unreachable) @@ -45151,6 +45236,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2540) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -0) + (f64.const 1) + (f64.const -0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2541) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45164,9 +45287,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0) + (f64.const -0.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (i32.const 0) ) ) @@ -45183,9 +45306,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0.5) (f64.const 1) - (f64.const 0.5) + (f64.const 1) + (f64.const 0) (i32.const 0) ) ) @@ -45202,9 +45325,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0.5) + (f64.const -1) (f64.const 1) - (f64.const -0.5) + (f64.const -0) (i32.const 0) ) ) @@ -45221,9 +45344,9 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const 1.5) (f64.const 1) - (f64.const 1) - (f64.const 0) + (f64.const -0.5) (i32.const 0) ) ) @@ -45240,9 +45363,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.const -1.5) (f64.const 1) - (f64.const -0) + (f64.const 0.5) (i32.const 0) ) ) @@ -45259,9 +45382,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1.5) + (f64.const 2) (f64.const 1) - (f64.const -0.5) + (f64.const 0) (i32.const 0) ) ) @@ -45275,44 +45398,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -1.5) - (f64.const 1) - (f64.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2549) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 2) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2550) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -45326,7 +45411,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2551) + (i32.const 2549) (i32.const 0) ) (unreachable) @@ -45345,7 +45430,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2552) + (i32.const 2550) (i32.const 0) ) (unreachable) @@ -45364,7 +45449,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2553) + (i32.const 2551) (i32.const 0) ) (unreachable) @@ -45379,6 +45464,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2552) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0) + (f64.const -1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2553) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -0) + (f64.const -1) + (f64.const -0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45392,9 +45515,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0) + (f64.const 0.5) (f64.const -1) - (f64.const 0) + (f64.const 0.5) (i32.const 0) ) ) @@ -45411,9 +45534,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0) + (f64.const -0.5) (f64.const -1) - (f64.const -0) + (f64.const -0.5) (i32.const 0) ) ) @@ -45427,44 +45550,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2557) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2558) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -45478,7 +45563,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2559) + (i32.const 2557) (i32.const 0) ) (unreachable) @@ -45497,7 +45582,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2560) + (i32.const 2558) (i32.const 0) ) (unreachable) @@ -45516,7 +45601,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2561) + (i32.const 2559) (i32.const 0) ) (unreachable) @@ -45535,7 +45620,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2562) + (i32.const 2560) (i32.const 0) ) (unreachable) @@ -45554,7 +45639,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2563) + (i32.const 2561) (i32.const 0) ) (unreachable) @@ -45573,7 +45658,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2564) + (i32.const 2562) (i32.const 0) ) (unreachable) @@ -45592,7 +45677,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2565) + (i32.const 2563) (i32.const 0) ) (unreachable) @@ -45607,6 +45692,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2564) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const nan:0x8000000000000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2565) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45620,10 +45743,10 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) - (f64.const -1) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -45640,9 +45763,9 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) + (f64.const inf) (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -45659,9 +45782,9 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -inf) + (f64.const 0) + (i32.const 0) ) ) (block @@ -45678,8 +45801,8 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (i32.const 0) ) ) @@ -45696,10 +45819,10 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const -0) (f64.const 0) - (f64.const -inf) - (f64.const 0) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -45715,10 +45838,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0) + (f64.const -0) + (f64.const -0) (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -45731,44 +45854,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2573) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2574) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -45782,7 +45867,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2575) + (i32.const 2573) (i32.const 0) ) (unreachable) @@ -45801,7 +45886,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2576) + (i32.const 2574) (i32.const 0) ) (unreachable) @@ -45820,7 +45905,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2577) + (i32.const 2575) (i32.const 0) ) (unreachable) @@ -45835,6 +45920,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2576) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -1) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2577) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45848,7 +45971,7 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.const -inf) (f64.const 0) (f64.const nan:0x8000000000000) (i32.const 2) @@ -45867,10 +45990,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (f64.const nan:0x8000000000000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -45883,44 +46006,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -inf) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2581) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const nan:0x8000000000000) - (f64.const 0) - (f64.const nan:0x8000000000000) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2582) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -45934,7 +46019,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2583) + (i32.const 2581) (i32.const 0) ) (unreachable) @@ -45953,7 +46038,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2584) + (i32.const 2582) (i32.const 0) ) (unreachable) @@ -45968,6 +46053,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2583) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const nan:0x8000000000000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2584) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const inf) + (f64.const 2) + (f64.const nan:0x8000000000000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45981,10 +46104,10 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) - (f64.const -0) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -46001,9 +46124,9 @@ (i32.eqz (call $std/math/test_rem (f64.const inf) - (f64.const 2) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -46019,8 +46142,8 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const -0.5) + (f64.const -inf) + (f64.const 2) (f64.const nan:0x8000000000000) (i32.const 2) ) @@ -46038,10 +46161,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) + (f64.const -inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -46058,9 +46181,9 @@ (i32.eqz (call $std/math/test_rem (f64.const -inf) - (f64.const 2) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -46076,10 +46199,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -inf) - (f64.const -0.5) (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) + (i32.const 0) ) ) (block @@ -46095,7 +46218,7 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -inf) + (f64.const 1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (i32.const 0) @@ -46114,7 +46237,7 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (i32.const 0) @@ -46134,8 +46257,8 @@ (i32.eqz (call $std/math/test_rem (f64.const 1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const 1) (i32.const 0) ) ) @@ -46153,8 +46276,8 @@ (i32.eqz (call $std/math/test_rem (f64.const -1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const -1) (i32.const 0) ) ) @@ -46171,10 +46294,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1) (f64.const inf) - (f64.const 1) - (i32.const 0) + (f64.const inf) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -46190,10 +46313,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.const -inf) (f64.const inf) - (f64.const -1) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -46209,10 +46332,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const 1) + (f64.const -inf) + (f64.const 1) + (i32.const 0) ) ) (block @@ -46228,10 +46351,10 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const -1) (f64.const -inf) - (f64.const inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -1) + (i32.const 0) ) ) (block @@ -46247,10 +46370,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1) + (f64.const inf) (f64.const -inf) - (f64.const 1) - (i32.const 0) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -46266,10 +46389,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) (f64.const -inf) - (f64.const -1) - (i32.const 0) + (f64.const -inf) + (f64.const nan:0x8000000000000) + (i32.const 2) ) ) (block @@ -46285,10 +46408,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const -inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const 1.75) + (f64.const 0.5) + (f64.const -0.25) + (i32.const 0) ) ) (block @@ -46304,10 +46427,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -inf) - (f64.const -inf) - (f64.const nan:0x8000000000000) - (i32.const 2) + (f64.const -1.75) + (f64.const 0.5) + (f64.const 0.25) + (i32.const 0) ) ) (block @@ -46324,7 +46447,7 @@ (i32.eqz (call $std/math/test_rem (f64.const 1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const -0.25) (i32.const 0) ) @@ -46343,7 +46466,7 @@ (i32.eqz (call $std/math/test_rem (f64.const -1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const 0.25) (i32.const 0) ) @@ -46358,44 +46481,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 1.75) - (f64.const -0.5) - (f64.const -0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2606) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -1.75) - (f64.const -0.5) - (f64.const 0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2607) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -46409,7 +46494,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2608) + (i32.const 2606) (i32.const 0) ) (unreachable) @@ -46428,7 +46513,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2617) + (i32.const 2615) (i32.const 0) ) (unreachable) @@ -46447,7 +46532,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2618) + (i32.const 2616) (i32.const 0) ) (unreachable) @@ -46466,7 +46551,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2619) + (i32.const 2617) (i32.const 0) ) (unreachable) @@ -46485,7 +46570,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2620) + (i32.const 2618) (i32.const 0) ) (unreachable) @@ -46504,7 +46589,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2621) + (i32.const 2619) (i32.const 0) ) (unreachable) @@ -46523,7 +46608,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2622) + (i32.const 2620) (i32.const 0) ) (unreachable) @@ -46542,7 +46627,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2623) + (i32.const 2621) (i32.const 0) ) (unreachable) @@ -46561,7 +46646,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2624) + (i32.const 2622) (i32.const 0) ) (unreachable) @@ -46580,7 +46665,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2625) + (i32.const 2623) (i32.const 0) ) (unreachable) @@ -46599,7 +46684,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2626) + (i32.const 2624) (i32.const 0) ) (unreachable) @@ -46614,6 +46699,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2627) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -0) + (f32.const 1) + (f32.const -0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2628) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -46627,9 +46750,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0) + (f32.const -0.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (i32.const 0) ) ) @@ -46646,9 +46769,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0.5) (f32.const 1) - (f32.const 0.5) + (f32.const 1) + (f32.const 0) (i32.const 0) ) ) @@ -46665,9 +46788,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0.5) + (f32.const -1) (f32.const 1) - (f32.const -0.5) + (f32.const -0) (i32.const 0) ) ) @@ -46684,9 +46807,9 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const 1.5) (f32.const 1) - (f32.const 1) - (f32.const 0) + (f32.const -0.5) (i32.const 0) ) ) @@ -46703,9 +46826,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.const -1.5) (f32.const 1) - (f32.const -0) + (f32.const 0.5) (i32.const 0) ) ) @@ -46722,9 +46845,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1.5) + (f32.const 2) (f32.const 1) - (f32.const -0.5) + (f32.const 0) (i32.const 0) ) ) @@ -46738,44 +46861,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -1.5) - (f32.const 1) - (f32.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2636) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 2) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2637) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -46789,7 +46874,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2638) + (i32.const 2636) (i32.const 0) ) (unreachable) @@ -46808,7 +46893,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2639) + (i32.const 2637) (i32.const 0) ) (unreachable) @@ -46827,7 +46912,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2640) + (i32.const 2638) (i32.const 0) ) (unreachable) @@ -46842,6 +46927,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2639) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0) + (f32.const -1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2640) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -0) + (f32.const -1) + (f32.const -0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -46855,9 +46978,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0) + (f32.const 0.5) (f32.const -1) - (f32.const 0) + (f32.const 0.5) (i32.const 0) ) ) @@ -46874,9 +46997,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0) + (f32.const -0.5) (f32.const -1) - (f32.const -0) + (f32.const -0.5) (i32.const 0) ) ) @@ -46890,44 +47013,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2644) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2645) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -46941,7 +47026,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2646) + (i32.const 2644) (i32.const 0) ) (unreachable) @@ -46960,7 +47045,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2647) + (i32.const 2645) (i32.const 0) ) (unreachable) @@ -46979,7 +47064,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2648) + (i32.const 2646) (i32.const 0) ) (unreachable) @@ -46998,7 +47083,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2649) + (i32.const 2647) (i32.const 0) ) (unreachable) @@ -47017,7 +47102,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2650) + (i32.const 2648) (i32.const 0) ) (unreachable) @@ -47036,7 +47121,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2651) + (i32.const 2649) (i32.const 0) ) (unreachable) @@ -47055,7 +47140,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2652) + (i32.const 2650) (i32.const 0) ) (unreachable) @@ -47070,6 +47155,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2651) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const nan:0x400000) + (f32.const -1) + (f32.const nan:0x400000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2652) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -47083,10 +47206,10 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) - (f32.const -1) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -47103,9 +47226,9 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) + (f32.const inf) (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -47122,9 +47245,9 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -inf) + (f32.const 0) + (i32.const 0) ) ) (block @@ -47141,8 +47264,8 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (i32.const 0) ) ) @@ -47159,10 +47282,10 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const -0) (f32.const 0) - (f32.const -inf) - (f32.const 0) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -47178,10 +47301,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0) + (f32.const -0) + (f32.const -0) (f32.const nan:0x400000) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -47194,44 +47317,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2660) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2661) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -47245,7 +47330,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2662) + (i32.const 2660) (i32.const 0) ) (unreachable) @@ -47264,7 +47349,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2663) + (i32.const 2661) (i32.const 0) ) (unreachable) @@ -47283,7 +47368,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2664) + (i32.const 2662) (i32.const 0) ) (unreachable) @@ -47298,6 +47383,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2663) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -1) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2664) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -47311,7 +47434,7 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.const -inf) (f32.const 0) (f32.const nan:0x400000) (i32.const 2) @@ -47330,10 +47453,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (f32.const nan:0x400000) - (i32.const 2) + (i32.const 0) ) ) (block @@ -47346,44 +47469,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -inf) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 2) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2668) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const nan:0x400000) - (f32.const 0) - (f32.const nan:0x400000) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2669) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -47397,7 +47482,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2670) + (i32.const 2668) (i32.const 0) ) (unreachable) @@ -47416,7 +47501,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2671) + (i32.const 2669) (i32.const 0) ) (unreachable) @@ -47431,6 +47516,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2670) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const nan:0x400000) + (f32.const -0) + (f32.const nan:0x400000) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2671) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const inf) + (f32.const 2) + (f32.const nan:0x400000) + (i32.const 2) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -47444,10 +47567,10 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const inf) + (f32.const -0.5) (f32.const nan:0x400000) - (f32.const -0) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -47464,9 +47587,9 @@ (i32.eqz (call $std/math/test_remf (f32.const inf) - (f32.const 2) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -47482,8 +47605,8 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const -0.5) + (f32.const -inf) + (f32.const 2) (f32.const nan:0x400000) (i32.const 2) ) @@ -47501,10 +47624,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) + (f32.const -inf) + (f32.const -0.5) (f32.const nan:0x400000) - (f32.const nan:0x400000) - (i32.const 0) + (i32.const 2) ) ) (block @@ -47521,9 +47644,9 @@ (i32.eqz (call $std/math/test_remf (f32.const -inf) - (f32.const 2) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -47539,10 +47662,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -inf) - (f32.const -0.5) (f32.const nan:0x400000) - (i32.const 2) + (f32.const nan:0x400000) + (f32.const nan:0x400000) + (i32.const 0) ) ) (block @@ -47558,7 +47681,7 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -inf) + (f32.const 1) (f32.const nan:0x400000) (f32.const nan:0x400000) (i32.const 0) @@ -47577,7 +47700,7 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const nan:0x400000) + (f32.const -1) (f32.const nan:0x400000) (f32.const nan:0x400000) (i32.const 0) @@ -47597,8 +47720,8 @@ (i32.eqz (call $std/math/test_remf (f32.const 1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const 1) (i32.const 0) ) ) @@ -47616,8 +47739,8 @@ (i32.eqz (call $std/math/test_remf (f32.const -1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const -1) (i32.const 0) ) ) @@ -47634,10 +47757,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1) (f32.const inf) - (f32.const 1) - (i32.const 0) + (f32.const inf) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -47653,10 +47776,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.const -inf) (f32.const inf) - (f32.const -1) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -47672,10 +47795,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const 1) + (f32.const -inf) + (f32.const 1) + (i32.const 0) ) ) (block @@ -47691,10 +47814,10 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const -1) (f32.const -inf) - (f32.const inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -1) + (i32.const 0) ) ) (block @@ -47710,10 +47833,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1) + (f32.const inf) (f32.const -inf) - (f32.const 1) - (i32.const 0) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -47729,10 +47852,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) (f32.const -inf) - (f32.const -1) - (i32.const 0) + (f32.const -inf) + (f32.const nan:0x400000) + (i32.const 2) ) ) (block @@ -47748,10 +47871,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const -inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const 1.75) + (f32.const 0.5) + (f32.const -0.25) + (i32.const 0) ) ) (block @@ -47767,10 +47890,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -inf) - (f32.const -inf) - (f32.const nan:0x400000) - (i32.const 2) + (f32.const -1.75) + (f32.const 0.5) + (f32.const 0.25) + (i32.const 0) ) ) (block @@ -47787,7 +47910,7 @@ (i32.eqz (call $std/math/test_remf (f32.const 1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const -0.25) (i32.const 0) ) @@ -47806,7 +47929,7 @@ (i32.eqz (call $std/math/test_remf (f32.const -1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const 0.25) (i32.const 0) ) @@ -47821,44 +47944,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 1.75) - (f32.const -0.5) - (f32.const -0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2693) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -1.75) - (f32.const -0.5) - (f32.const 0.25) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2694) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -47872,7 +47957,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2695) + (i32.const 2693) (i32.const 0) ) (unreachable) @@ -47891,7 +47976,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2760) + (i32.const 2758) (i32.const 0) ) (unreachable) @@ -47910,7 +47995,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2761) + (i32.const 2759) (i32.const 0) ) (unreachable) @@ -47929,7 +48014,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2762) + (i32.const 2760) (i32.const 0) ) (unreachable) @@ -47948,7 +48033,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2763) + (i32.const 2761) (i32.const 0) ) (unreachable) @@ -47967,7 +48052,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2764) + (i32.const 2762) (i32.const 0) ) (unreachable) @@ -47986,7 +48071,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2765) + (i32.const 2763) (i32.const 0) ) (unreachable) @@ -48005,7 +48090,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2766) + (i32.const 2764) (i32.const 0) ) (unreachable) @@ -48024,7 +48109,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2767) + (i32.const 2765) (i32.const 0) ) (unreachable) @@ -48043,7 +48128,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2768) + (i32.const 2766) (i32.const 0) ) (unreachable) @@ -48062,7 +48147,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2769) + (i32.const 2767) (i32.const 0) ) (unreachable) @@ -48077,6 +48162,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2770) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinh + (f64.const -0) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2771) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinh + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48090,8 +48213,8 @@ (if (i32.eqz (call $std/math/test_sinh - (f64.const -0) - (f64.const -0) + (f64.const -inf) + (f64.const -inf) (f64.const 0) (i32.const 0) ) @@ -48109,8 +48232,8 @@ (if (i32.eqz (call $std/math/test_sinh - (f64.const inf) - (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -48125,44 +48248,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sinh - (f64.const -inf) - (f64.const -inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2775) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sinh - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2776) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sinhf @@ -48176,7 +48261,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2785) + (i32.const 2783) (i32.const 0) ) (unreachable) @@ -48195,7 +48280,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2786) + (i32.const 2784) (i32.const 0) ) (unreachable) @@ -48214,7 +48299,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2787) + (i32.const 2785) (i32.const 0) ) (unreachable) @@ -48233,7 +48318,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2788) + (i32.const 2786) (i32.const 0) ) (unreachable) @@ -48252,7 +48337,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2789) + (i32.const 2787) (i32.const 0) ) (unreachable) @@ -48271,7 +48356,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2790) + (i32.const 2788) (i32.const 0) ) (unreachable) @@ -48290,7 +48375,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2791) + (i32.const 2789) (i32.const 0) ) (unreachable) @@ -48309,7 +48394,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2792) + (i32.const 2790) (i32.const 0) ) (unreachable) @@ -48328,7 +48413,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2793) + (i32.const 2791) (i32.const 0) ) (unreachable) @@ -48347,7 +48432,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2794) + (i32.const 2792) (i32.const 0) ) (unreachable) @@ -48362,6 +48447,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2795) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinhf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2796) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinhf + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48375,8 +48498,8 @@ (if (i32.eqz (call $std/math/test_sinhf - (f32.const -0) - (f32.const -0) + (f32.const -inf) + (f32.const -inf) (f32.const 0) (i32.const 0) ) @@ -48394,8 +48517,8 @@ (if (i32.eqz (call $std/math/test_sinhf - (f32.const inf) - (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -48410,44 +48533,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sinhf - (f32.const -inf) - (f32.const -inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2800) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sinhf - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2801) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -48461,7 +48546,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2813) + (i32.const 2811) (i32.const 0) ) (unreachable) @@ -48480,7 +48565,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2814) + (i32.const 2812) (i32.const 0) ) (unreachable) @@ -48499,7 +48584,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2815) + (i32.const 2813) (i32.const 0) ) (unreachable) @@ -48518,7 +48603,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2816) + (i32.const 2814) (i32.const 0) ) (unreachable) @@ -48537,7 +48622,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2817) + (i32.const 2815) (i32.const 0) ) (unreachable) @@ -48556,7 +48641,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2818) + (i32.const 2816) (i32.const 0) ) (unreachable) @@ -48575,7 +48660,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2819) + (i32.const 2817) (i32.const 0) ) (unreachable) @@ -48594,7 +48679,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2820) + (i32.const 2818) (i32.const 0) ) (unreachable) @@ -48613,7 +48698,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2821) + (i32.const 2819) (i32.const 0) ) (unreachable) @@ -48632,7 +48717,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2822) + (i32.const 2820) (i32.const 0) ) (unreachable) @@ -48651,7 +48736,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2825) + (i32.const 2823) (i32.const 0) ) (unreachable) @@ -48670,7 +48755,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2826) + (i32.const 2824) (i32.const 0) ) (unreachable) @@ -48685,6 +48770,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2825) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 0) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2826) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const -0) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48698,8 +48821,8 @@ (if (i32.eqz (call $std/math/test_sqrt - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -48714,44 +48837,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const -0) - (f64.const -0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2829) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 1) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2830) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -48765,7 +48850,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2831) + (i32.const 2829) (i32.const 0) ) (unreachable) @@ -48784,7 +48869,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2832) + (i32.const 2830) (i32.const 0) ) (unreachable) @@ -48803,7 +48888,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2833) + (i32.const 2831) (i32.const 0) ) (unreachable) @@ -48822,7 +48907,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2834) + (i32.const 2832) (i32.const 0) ) (unreachable) @@ -48841,7 +48926,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2835) + (i32.const 2833) (i32.const 0) ) (unreachable) @@ -48860,7 +48945,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2836) + (i32.const 2834) (i32.const 0) ) (unreachable) @@ -48879,7 +48964,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2837) + (i32.const 2835) (i32.const 0) ) (unreachable) @@ -48894,6 +48979,44 @@ (i32.const 1) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2836) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 1.0000000000000002) + (f64.const 1) + (f64.const -0.5) + (i32.const 1) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2837) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 2.0000000000000004) + (f64.const 1.4142135623730951) + (f64.const -0.27173060178756714) + (i32.const 1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48926,9 +49049,9 @@ (if (i32.eqz (call $std/math/test_sqrt - (f64.const 2.0000000000000004) - (f64.const 1.4142135623730951) - (f64.const -0.27173060178756714) + (f64.const 0.9999999999999999) + (f64.const 0.9999999999999999) + (f64.const -0.5) (i32.const 1) ) ) @@ -48942,44 +49065,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 1.0000000000000002) - (f64.const 1) - (f64.const -0.5) - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2841) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 0.9999999999999999) - (f64.const 0.9999999999999999) - (f64.const -0.5) - (i32.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2842) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -48993,7 +49078,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2843) + (i32.const 2841) (i32.const 0) ) (unreachable) @@ -49012,7 +49097,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2844) + (i32.const 2842) (i32.const 0) ) (unreachable) @@ -49031,7 +49116,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2845) + (i32.const 2843) (i32.const 0) ) (unreachable) @@ -49050,7 +49135,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2846) + (i32.const 2844) (i32.const 0) ) (unreachable) @@ -49069,7 +49154,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2847) + (i32.const 2845) (i32.const 0) ) (unreachable) @@ -49088,7 +49173,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2848) + (i32.const 2846) (i32.const 0) ) (unreachable) @@ -49107,7 +49192,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2849) + (i32.const 2847) (i32.const 0) ) (unreachable) @@ -49126,7 +49211,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2850) + (i32.const 2848) (i32.const 0) ) (unreachable) @@ -49145,7 +49230,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2851) + (i32.const 2849) (i32.const 0) ) (unreachable) @@ -49164,7 +49249,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2852) + (i32.const 2850) (i32.const 0) ) (unreachable) @@ -49183,7 +49268,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2853) + (i32.const 2851) (i32.const 0) ) (unreachable) @@ -49202,7 +49287,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2854) + (i32.const 2852) (i32.const 0) ) (unreachable) @@ -49221,7 +49306,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2855) + (i32.const 2853) (i32.const 0) ) (unreachable) @@ -49240,7 +49325,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2856) + (i32.const 2854) (i32.const 0) ) (unreachable) @@ -49259,7 +49344,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2857) + (i32.const 2855) (i32.const 0) ) (unreachable) @@ -49278,7 +49363,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2858) + (i32.const 2856) (i32.const 0) ) (unreachable) @@ -49297,7 +49382,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2859) + (i32.const 2857) (i32.const 0) ) (unreachable) @@ -49316,7 +49401,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2860) + (i32.const 2858) (i32.const 0) ) (unreachable) @@ -49335,7 +49420,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2861) + (i32.const 2859) (i32.const 0) ) (unreachable) @@ -49354,7 +49439,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2862) + (i32.const 2860) (i32.const 0) ) (unreachable) @@ -49373,7 +49458,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2863) + (i32.const 2861) (i32.const 0) ) (unreachable) @@ -49392,7 +49477,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2864) + (i32.const 2862) (i32.const 0) ) (unreachable) @@ -49411,7 +49496,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2865) + (i32.const 2863) (i32.const 0) ) (unreachable) @@ -49430,7 +49515,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2866) + (i32.const 2864) (i32.const 0) ) (unreachable) @@ -49449,7 +49534,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2867) + (i32.const 2865) (i32.const 0) ) (unreachable) @@ -49468,7 +49553,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2868) + (i32.const 2866) (i32.const 0) ) (unreachable) @@ -49487,7 +49572,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2869) + (i32.const 2867) (i32.const 0) ) (unreachable) @@ -49506,7 +49591,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2870) + (i32.const 2868) (i32.const 0) ) (unreachable) @@ -49525,7 +49610,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2871) + (i32.const 2869) (i32.const 0) ) (unreachable) @@ -49544,7 +49629,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2872) + (i32.const 2870) (i32.const 0) ) (unreachable) @@ -49563,7 +49648,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2873) + (i32.const 2871) (i32.const 0) ) (unreachable) @@ -49582,7 +49667,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2874) + (i32.const 2872) (i32.const 0) ) (unreachable) @@ -49601,7 +49686,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2875) + (i32.const 2873) (i32.const 0) ) (unreachable) @@ -49620,7 +49705,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2876) + (i32.const 2874) (i32.const 0) ) (unreachable) @@ -49639,7 +49724,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2877) + (i32.const 2875) (i32.const 0) ) (unreachable) @@ -49658,7 +49743,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2878) + (i32.const 2876) (i32.const 0) ) (unreachable) @@ -49677,7 +49762,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2879) + (i32.const 2877) (i32.const 0) ) (unreachable) @@ -49696,7 +49781,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2880) + (i32.const 2878) (i32.const 0) ) (unreachable) @@ -49715,7 +49800,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2881) + (i32.const 2879) (i32.const 0) ) (unreachable) @@ -49734,7 +49819,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2882) + (i32.const 2880) (i32.const 0) ) (unreachable) @@ -49753,7 +49838,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2883) + (i32.const 2881) (i32.const 0) ) (unreachable) @@ -49772,7 +49857,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2884) + (i32.const 2882) (i32.const 0) ) (unreachable) @@ -49791,7 +49876,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2885) + (i32.const 2883) (i32.const 0) ) (unreachable) @@ -49810,7 +49895,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2886) + (i32.const 2884) (i32.const 0) ) (unreachable) @@ -49829,7 +49914,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2887) + (i32.const 2885) (i32.const 0) ) (unreachable) @@ -49848,7 +49933,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2888) + (i32.const 2886) (i32.const 0) ) (unreachable) @@ -49867,7 +49952,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2889) + (i32.const 2887) (i32.const 0) ) (unreachable) @@ -49886,7 +49971,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2890) + (i32.const 2888) (i32.const 0) ) (unreachable) @@ -49905,7 +49990,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2891) + (i32.const 2889) (i32.const 0) ) (unreachable) @@ -49924,7 +50009,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2892) + (i32.const 2890) (i32.const 0) ) (unreachable) @@ -49943,7 +50028,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2893) + (i32.const 2891) (i32.const 0) ) (unreachable) @@ -49962,7 +50047,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2894) + (i32.const 2892) (i32.const 0) ) (unreachable) @@ -49981,7 +50066,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2895) + (i32.const 2893) (i32.const 0) ) (unreachable) @@ -50000,7 +50085,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2896) + (i32.const 2894) (i32.const 0) ) (unreachable) @@ -50019,7 +50104,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2897) + (i32.const 2895) (i32.const 0) ) (unreachable) @@ -50038,7 +50123,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2898) + (i32.const 2896) (i32.const 0) ) (unreachable) @@ -50057,7 +50142,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2907) + (i32.const 2905) (i32.const 0) ) (unreachable) @@ -50076,7 +50161,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2908) + (i32.const 2906) (i32.const 0) ) (unreachable) @@ -50095,7 +50180,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2909) + (i32.const 2907) (i32.const 0) ) (unreachable) @@ -50114,7 +50199,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2910) + (i32.const 2908) (i32.const 0) ) (unreachable) @@ -50133,7 +50218,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2911) + (i32.const 2909) (i32.const 0) ) (unreachable) @@ -50152,7 +50237,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2912) + (i32.const 2910) (i32.const 0) ) (unreachable) @@ -50171,7 +50256,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2913) + (i32.const 2911) (i32.const 0) ) (unreachable) @@ -50190,7 +50275,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2914) + (i32.const 2912) (i32.const 0) ) (unreachable) @@ -50209,7 +50294,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2915) + (i32.const 2913) (i32.const 0) ) (unreachable) @@ -50228,7 +50313,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2916) + (i32.const 2914) (i32.const 0) ) (unreachable) @@ -50247,7 +50332,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2919) + (i32.const 2917) (i32.const 0) ) (unreachable) @@ -50266,7 +50351,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2920) + (i32.const 2918) (i32.const 0) ) (unreachable) @@ -50281,6 +50366,44 @@ (i32.const 2) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2919) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrtf + (f32.const 0) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2920) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrtf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -50294,8 +50417,8 @@ (if (i32.eqz (call $std/math/test_sqrtf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -50310,44 +50433,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrtf - (f32.const -0) - (f32.const -0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2923) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrtf - (f32.const 1) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2924) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrtf @@ -50361,7 +50446,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2925) + (i32.const 2923) (i32.const 0) ) (unreachable) @@ -50380,7 +50465,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2926) + (i32.const 2924) (i32.const 0) ) (unreachable) @@ -50399,7 +50484,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2927) + (i32.const 2925) (i32.const 0) ) (unreachable) @@ -50418,7 +50503,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2928) + (i32.const 2926) (i32.const 0) ) (unreachable) @@ -50437,7 +50522,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2929) + (i32.const 2927) (i32.const 0) ) (unreachable) @@ -50456,7 +50541,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2930) + (i32.const 2928) (i32.const 0) ) (unreachable) @@ -50475,7 +50560,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2931) + (i32.const 2929) (i32.const 0) ) (unreachable) @@ -50494,7 +50579,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2932) + (i32.const 2930) (i32.const 0) ) (unreachable) @@ -50513,7 +50598,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2933) + (i32.const 2931) (i32.const 0) ) (unreachable) @@ -50532,7 +50617,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2934) + (i32.const 2932) (i32.const 0) ) (unreachable) @@ -50551,7 +50636,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2935) + (i32.const 2933) (i32.const 0) ) (unreachable) @@ -50570,7 +50655,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2936) + (i32.const 2934) (i32.const 0) ) (unreachable) @@ -50589,7 +50674,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2937) + (i32.const 2935) (i32.const 0) ) (unreachable) @@ -50608,7 +50693,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2938) + (i32.const 2936) (i32.const 0) ) (unreachable) @@ -50627,7 +50712,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2939) + (i32.const 2937) (i32.const 0) ) (unreachable) @@ -50646,7 +50731,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2940) + (i32.const 2938) (i32.const 0) ) (unreachable) @@ -50665,7 +50750,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3005) + (i32.const 3003) (i32.const 0) ) (unreachable) @@ -50684,7 +50769,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3006) + (i32.const 3004) (i32.const 0) ) (unreachable) @@ -50703,7 +50788,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3007) + (i32.const 3005) (i32.const 0) ) (unreachable) @@ -50722,7 +50807,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3008) + (i32.const 3006) (i32.const 0) ) (unreachable) @@ -50741,7 +50826,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3009) + (i32.const 3007) (i32.const 0) ) (unreachable) @@ -50760,7 +50845,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3010) + (i32.const 3008) (i32.const 0) ) (unreachable) @@ -50779,7 +50864,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3011) + (i32.const 3009) (i32.const 0) ) (unreachable) @@ -50798,7 +50883,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3012) + (i32.const 3010) (i32.const 0) ) (unreachable) @@ -50817,7 +50902,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3013) + (i32.const 3011) (i32.const 0) ) (unreachable) @@ -50836,7 +50921,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3014) + (i32.const 3012) (i32.const 0) ) (unreachable) @@ -50855,7 +50940,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3017) + (i32.const 3015) (i32.const 0) ) (unreachable) @@ -50874,7 +50959,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3018) + (i32.const 3016) (i32.const 0) ) (unreachable) @@ -50893,7 +50978,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3019) + (i32.const 3017) (i32.const 0) ) (unreachable) @@ -50912,7 +50997,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3020) + (i32.const 3018) (i32.const 0) ) (unreachable) @@ -50931,7 +51016,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3021) + (i32.const 3019) (i32.const 0) ) (unreachable) @@ -50950,7 +51035,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3030) + (i32.const 3028) (i32.const 0) ) (unreachable) @@ -50969,7 +51054,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3031) + (i32.const 3029) (i32.const 0) ) (unreachable) @@ -50988,7 +51073,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3032) + (i32.const 3030) (i32.const 0) ) (unreachable) @@ -51007,7 +51092,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3033) + (i32.const 3031) (i32.const 0) ) (unreachable) @@ -51026,7 +51111,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3034) + (i32.const 3032) (i32.const 0) ) (unreachable) @@ -51045,7 +51130,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3035) + (i32.const 3033) (i32.const 0) ) (unreachable) @@ -51064,7 +51149,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3036) + (i32.const 3034) (i32.const 0) ) (unreachable) @@ -51083,7 +51168,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3037) + (i32.const 3035) (i32.const 0) ) (unreachable) @@ -51102,7 +51187,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3038) + (i32.const 3036) (i32.const 0) ) (unreachable) @@ -51121,7 +51206,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3039) + (i32.const 3037) (i32.const 0) ) (unreachable) @@ -51136,6 +51221,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3040) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_tanhf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3041) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_tanhf + (f32.const inf) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51149,8 +51272,8 @@ (if (i32.eqz (call $std/math/test_tanhf - (f32.const -0) - (f32.const -0) + (f32.const -inf) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -51168,8 +51291,8 @@ (if (i32.eqz (call $std/math/test_tanhf - (f32.const inf) - (f32.const 1) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -51184,44 +51307,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_tanhf - (f32.const -inf) - (f32.const -1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3045) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_tanhf - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3046) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_trunc @@ -51234,7 +51319,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3058) + (i32.const 3056) (i32.const 0) ) (unreachable) @@ -51252,7 +51337,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3059) + (i32.const 3057) (i32.const 0) ) (unreachable) @@ -51270,7 +51355,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3060) + (i32.const 3058) (i32.const 0) ) (unreachable) @@ -51288,7 +51373,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3061) + (i32.const 3059) (i32.const 0) ) (unreachable) @@ -51306,7 +51391,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3062) + (i32.const 3060) (i32.const 0) ) (unreachable) @@ -51324,7 +51409,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3063) + (i32.const 3061) (i32.const 0) ) (unreachable) @@ -51342,7 +51427,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3064) + (i32.const 3062) (i32.const 0) ) (unreachable) @@ -51360,7 +51445,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3065) + (i32.const 3063) (i32.const 0) ) (unreachable) @@ -51378,7 +51463,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3066) + (i32.const 3064) (i32.const 0) ) (unreachable) @@ -51396,7 +51481,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3067) + (i32.const 3065) (i32.const 0) ) (unreachable) @@ -51410,6 +51495,42 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3068) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_trunc + (f64.const inf) + (f64.const inf) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3069) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_trunc + (f64.const -inf) + (f64.const -inf) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51423,8 +51544,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const inf) - (f64.const inf) + (f64.const 0) + (f64.const 0) (i32.const 0) ) ) @@ -51441,8 +51562,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const -inf) - (f64.const -inf) + (f64.const -0) + (f64.const -0) (i32.const 0) ) ) @@ -51459,8 +51580,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (i32.const 0) ) ) @@ -51477,8 +51598,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const -0) - (f64.const -0) + (f64.const -1) + (f64.const -1) (i32.const 0) ) ) @@ -51492,42 +51613,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_trunc - (f64.const 1) - (f64.const 1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3075) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_trunc - (f64.const -1) - (f64.const -1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3076) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_trunc @@ -51540,7 +51625,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3077) + (i32.const 3075) (i32.const 0) ) (unreachable) @@ -51558,7 +51643,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3078) + (i32.const 3076) (i32.const 0) ) (unreachable) @@ -51576,7 +51661,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3079) + (i32.const 3077) (i32.const 0) ) (unreachable) @@ -51594,7 +51679,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3080) + (i32.const 3078) (i32.const 0) ) (unreachable) @@ -51612,7 +51697,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3081) + (i32.const 3079) (i32.const 0) ) (unreachable) @@ -51630,7 +51715,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3082) + (i32.const 3080) (i32.const 0) ) (unreachable) @@ -51648,7 +51733,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3083) + (i32.const 3081) (i32.const 0) ) (unreachable) @@ -51666,7 +51751,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3084) + (i32.const 3082) (i32.const 0) ) (unreachable) @@ -51684,7 +51769,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3093) + (i32.const 3091) (i32.const 0) ) (unreachable) @@ -51702,7 +51787,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3094) + (i32.const 3092) (i32.const 0) ) (unreachable) @@ -51720,7 +51805,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3095) + (i32.const 3093) (i32.const 0) ) (unreachable) @@ -51738,7 +51823,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3096) + (i32.const 3094) (i32.const 0) ) (unreachable) @@ -51756,7 +51841,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3097) + (i32.const 3095) (i32.const 0) ) (unreachable) @@ -51774,7 +51859,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3098) + (i32.const 3096) (i32.const 0) ) (unreachable) @@ -51792,7 +51877,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3099) + (i32.const 3097) (i32.const 0) ) (unreachable) @@ -51810,7 +51895,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3100) + (i32.const 3098) (i32.const 0) ) (unreachable) @@ -51828,7 +51913,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3101) + (i32.const 3099) (i32.const 0) ) (unreachable) @@ -51846,7 +51931,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3102) + (i32.const 3100) (i32.const 0) ) (unreachable) @@ -51860,6 +51945,42 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3103) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_truncf + (f32.const inf) + (f32.const inf) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3104) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_truncf + (f32.const -inf) + (f32.const -inf) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51873,8 +51994,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const inf) - (f32.const inf) + (f32.const 0) + (f32.const 0) (i32.const 0) ) ) @@ -51891,8 +52012,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const -inf) - (f32.const -inf) + (f32.const -0) + (f32.const -0) (i32.const 0) ) ) @@ -51909,8 +52030,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (i32.const 0) ) ) @@ -51927,8 +52048,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const -0) - (f32.const -0) + (f32.const -1) + (f32.const -1) (i32.const 0) ) ) @@ -51942,42 +52063,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_truncf - (f32.const 1) - (f32.const 1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3110) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_truncf - (f32.const -1) - (f32.const -1) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3111) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_truncf @@ -51990,7 +52075,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3112) + (i32.const 3110) (i32.const 0) ) (unreachable) @@ -52008,7 +52093,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3113) + (i32.const 3111) (i32.const 0) ) (unreachable) @@ -52026,7 +52111,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3114) + (i32.const 3112) (i32.const 0) ) (unreachable) @@ -52044,7 +52129,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3115) + (i32.const 3113) (i32.const 0) ) (unreachable) @@ -52062,7 +52147,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3116) + (i32.const 3114) (i32.const 0) ) (unreachable) @@ -52080,7 +52165,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3117) + (i32.const 3115) (i32.const 0) ) (unreachable) @@ -52098,7 +52183,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3118) + (i32.const 3116) (i32.const 0) ) (unreachable) @@ -52116,7 +52201,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3119) + (i32.const 3117) (i32.const 0) ) (unreachable) @@ -52134,7 +52219,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3123) + (i32.const 3121) (i32.const 0) ) (unreachable) @@ -52152,7 +52237,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3124) + (i32.const 3122) (i32.const 0) ) (unreachable) @@ -52170,7 +52255,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3125) + (i32.const 3123) (i32.const 0) ) (unreachable) @@ -52188,7 +52273,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3126) + (i32.const 3124) (i32.const 0) ) (unreachable) @@ -52202,6 +52287,42 @@ ) (i64.const 1) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3126) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i64.ne + (call $~lib/math/ipow64 + (i64.const 1) + (i32.const 1) + ) + (i64.const 1) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3127) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i64.ne + (call $~lib/math/ipow64 + (i64.const 1) + (i32.const 2) + ) + (i64.const 1) + ) (block (call $~lib/env/abort (i32.const 0) @@ -52216,7 +52337,7 @@ (i64.ne (call $~lib/math/ipow64 (i64.const 1) - (i32.const 1) + (i32.const 3) ) (i64.const 1) ) @@ -52233,26 +52354,8 @@ (if (i64.ne (call $~lib/math/ipow64 - (i64.const 1) - (i32.const 2) - ) - (i64.const 1) - ) - (block - (call $~lib/env/abort + (i64.const 2) (i32.const 0) - (i32.const 8) - (i32.const 3130) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i64.ne - (call $~lib/math/ipow64 - (i64.const 1) - (i32.const 3) ) (i64.const 1) ) @@ -52266,24 +52369,6 @@ (unreachable) ) ) - (if - (i64.ne - (call $~lib/math/ipow64 - (i64.const 2) - (i32.const 0) - ) - (i64.const 1) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3133) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i64.ne (call $~lib/math/ipow64 @@ -52296,7 +52381,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3134) + (i32.const 3132) (i32.const 0) ) (unreachable) @@ -52314,7 +52399,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3135) + (i32.const 3133) (i32.const 0) ) (unreachable) @@ -52332,7 +52417,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3136) + (i32.const 3134) (i32.const 0) ) (unreachable) @@ -52346,6 +52431,42 @@ ) (i64.const 1) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3136) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i64.ne + (call $~lib/math/ipow64 + (i64.const -1) + (i32.const 1) + ) + (i64.const -1) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3137) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i64.ne + (call $~lib/math/ipow64 + (i64.const -1) + (i32.const 2) + ) + (i64.const 1) + ) (block (call $~lib/env/abort (i32.const 0) @@ -52356,42 +52477,6 @@ (unreachable) ) ) - (if - (i64.ne - (call $~lib/math/ipow64 - (i64.const -1) - (i32.const 1) - ) - (i64.const -1) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3139) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i64.ne - (call $~lib/math/ipow64 - (i64.const -1) - (i32.const 2) - ) - (i64.const 1) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3140) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i64.ne (call $~lib/math/ipow64 @@ -52404,7 +52489,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3141) + (i32.const 3139) (i32.const 0) ) (unreachable) @@ -52422,7 +52507,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3143) + (i32.const 3141) (i32.const 0) ) (unreachable) @@ -52440,7 +52525,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3144) + (i32.const 3142) (i32.const 0) ) (unreachable) @@ -52458,7 +52543,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3145) + (i32.const 3143) (i32.const 0) ) (unreachable) @@ -52476,7 +52561,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3146) + (i32.const 3144) (i32.const 0) ) (unreachable) @@ -52494,7 +52579,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3148) + (i32.const 3146) (i32.const 0) ) (unreachable) @@ -52512,7 +52597,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3149) + (i32.const 3147) (i32.const 0) ) (unreachable) @@ -52530,7 +52615,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3150) + (i32.const 3148) (i32.const 0) ) (unreachable) @@ -52548,7 +52633,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3151) + (i32.const 3149) (i32.const 0) ) (unreachable) @@ -52566,7 +52651,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3152) + (i32.const 3150) (i32.const 0) ) (unreachable) @@ -52584,7 +52669,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3153) + (i32.const 3151) (i32.const 0) ) (unreachable) @@ -52602,23 +52687,29 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3154) + (i32.const 3152) (i32.const 0) ) (unreachable) ) ) + (set_local $4 + (call $~lib/math/ipow64 + (i64.const 57055) + (i32.const 3) + ) + ) + (set_local $5 + (call $~lib/math/ipow64 + (i64.const 339590) + (i32.const 3) + ) + ) (if (i64.ne (i64.add - (call $~lib/math/ipow64 - (i64.const 57055) - (i32.const 3) - ) - (call $~lib/math/ipow64 - (i64.const 339590) - (i32.const 3) - ) + (get_local $4) + (get_local $5) ) (i64.const 39347712995520375) ) @@ -52626,7 +52717,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3156) + (i32.const 3154) (i32.const 0) ) (unreachable) diff --git a/tests/compiler/std/math.ts b/tests/compiler/std/math.ts index fb5e1f64..cf3a1588 100644 --- a/tests/compiler/std/math.ts +++ b/tests/compiler/std/math.ts @@ -1985,13 +1985,11 @@ assert(test_minf(-1.75, -0.5, -1.75, 0.0, 0)); // Math.mod //////////////////////////////////////////////////////////////////////////////////////////////////// -declare namespace JSOp { - export function mod(x: f64, y: f64): f64; -} +declare function mod(x: f64, y: f64): f64; function test_mod(left: f64, right: f64, expected: f64, error: f64, flags: i32): bool { return check(NativeMath.mod(left, right), expected, error, flags) && - (!js || check( JSOp.mod(left, right), expected, error, flags)); + (!js || check( mod(left, right), expected, error, flags)); } // sanity diff --git a/tests/compiler/std/math.untouched.wat b/tests/compiler/std/math.untouched.wat index be0360be..ef7b982c 100644 --- a/tests/compiler/std/math.untouched.wat +++ b/tests/compiler/std/math.untouched.wat @@ -22,43 +22,48 @@ (type $f (func (result f32))) (type $IiI (func (param i64 i32) (result i64))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") + (data (i32.const 40) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "Math" "E" (global $~lib/bindings/Math/E f64)) + (import "Math" "LN2" (global $~lib/bindings/Math/LN2 f64)) + (import "Math" "LN10" (global $~lib/bindings/Math/LN10 f64)) + (import "Math" "LOG2E" (global $~lib/bindings/Math/LOG2E f64)) + (import "Math" "PI" (global $~lib/bindings/Math/PI f64)) + (import "Math" "SQRT1_2" (global $~lib/bindings/Math/SQRT1_2 f64)) + (import "Math" "SQRT2" (global $~lib/bindings/Math/SQRT2 f64)) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (import "JSMath" "E" (global $~lib/math/JSMath.E f64)) - (import "JSMath" "LN2" (global $~lib/math/JSMath.LN2 f64)) - (import "JSMath" "LN10" (global $~lib/math/JSMath.LN10 f64)) - (import "JSMath" "LOG2E" (global $~lib/math/JSMath.LOG2E f64)) - (import "JSMath" "PI" (global $~lib/math/JSMath.PI f64)) - (import "JSMath" "SQRT1_2" (global $~lib/math/JSMath.SQRT1_2 f64)) - (import "JSMath" "SQRT2" (global $~lib/math/JSMath.SQRT2 f64)) - (import "JSMath" "abs" (func $~lib/math/JSMath.abs (param f64) (result f64))) - (import "JSMath" "acos" (func $~lib/math/JSMath.acos (param f64) (result f64))) - (import "JSMath" "acosh" (func $~lib/math/JSMath.acosh (param f64) (result f64))) - (import "JSMath" "asin" (func $~lib/math/JSMath.asin (param f64) (result f64))) - (import "JSMath" "asinh" (func $~lib/math/JSMath.asinh (param f64) (result f64))) - (import "JSMath" "atan" (func $~lib/math/JSMath.atan (param f64) (result f64))) - (import "JSMath" "atanh" (func $~lib/math/JSMath.atanh (param f64) (result f64))) - (import "JSMath" "atan2" (func $~lib/math/JSMath.atan2 (param f64 f64) (result f64))) - (import "JSMath" "cbrt" (func $~lib/math/JSMath.cbrt (param f64) (result f64))) - (import "JSMath" "ceil" (func $~lib/math/JSMath.ceil (param f64) (result f64))) - (import "JSMath" "cosh" (func $~lib/math/JSMath.cosh (param f64) (result f64))) - (import "JSMath" "exp" (func $~lib/math/JSMath.exp (param f64) (result f64))) - (import "JSMath" "expm1" (func $~lib/math/JSMath.expm1 (param f64) (result f64))) - (import "JSMath" "floor" (func $~lib/math/JSMath.floor (param f64) (result f64))) - (import "JSMath" "hypot" (func $~lib/math/JSMath.hypot (param f64 f64) (result f64))) - (import "JSMath" "log" (func $~lib/math/JSMath.log (param f64) (result f64))) - (import "JSMath" "log10" (func $~lib/math/JSMath.log10 (param f64) (result f64))) - (import "JSMath" "log1p" (func $~lib/math/JSMath.log1p (param f64) (result f64))) - (import "JSMath" "log2" (func $~lib/math/JSMath.log2 (param f64) (result f64))) - (import "JSMath" "max" (func $~lib/math/JSMath.max (param f64 f64) (result f64))) - (import "JSMath" "min" (func $~lib/math/JSMath.min (param f64 f64) (result f64))) - (import "JSOp" "mod" (func $std/math/JSOp.mod (param f64 f64) (result f64))) - (import "JSMath" "pow" (func $~lib/math/JSMath.pow (param f64 f64) (result f64))) - (import "JSMath" "random" (func $~lib/math/JSMath.random (result f64))) - (import "JSMath" "sign" (func $~lib/math/JSMath.sign (param f64) (result f64))) - (import "JSMath" "sinh" (func $~lib/math/JSMath.sinh (param f64) (result f64))) - (import "JSMath" "sqrt" (func $~lib/math/JSMath.sqrt (param f64) (result f64))) - (import "JSMath" "tanh" (func $~lib/math/JSMath.tanh (param f64) (result f64))) - (import "JSMath" "trunc" (func $~lib/math/JSMath.trunc (param f64) (result f64))) + (import "Math" "abs" (func $~lib/bindings/Math/abs (param f64) (result f64))) + (import "Math" "acos" (func $~lib/bindings/Math/acos (param f64) (result f64))) + (import "Math" "acosh" (func $~lib/bindings/Math/acosh (param f64) (result f64))) + (import "Math" "asin" (func $~lib/bindings/Math/asin (param f64) (result f64))) + (import "Math" "asinh" (func $~lib/bindings/Math/asinh (param f64) (result f64))) + (import "Math" "atan" (func $~lib/bindings/Math/atan (param f64) (result f64))) + (import "Math" "atanh" (func $~lib/bindings/Math/atanh (param f64) (result f64))) + (import "Math" "atan2" (func $~lib/bindings/Math/atan2 (param f64 f64) (result f64))) + (import "Math" "cbrt" (func $~lib/bindings/Math/cbrt (param f64) (result f64))) + (import "Math" "ceil" (func $~lib/bindings/Math/ceil (param f64) (result f64))) + (import "Math" "cosh" (func $~lib/bindings/Math/cosh (param f64) (result f64))) + (import "Math" "exp" (func $~lib/bindings/Math/exp (param f64) (result f64))) + (import "Math" "expm1" (func $~lib/bindings/Math/expm1 (param f64) (result f64))) + (import "Math" "floor" (func $~lib/bindings/Math/floor (param f64) (result f64))) + (import "Math" "hypot" (func $~lib/bindings/Math/hypot (param f64 f64) (result f64))) + (import "Math" "log" (func $~lib/bindings/Math/log (param f64) (result f64))) + (import "Math" "log10" (func $~lib/bindings/Math/log10 (param f64) (result f64))) + (import "Math" "log1p" (func $~lib/bindings/Math/log1p (param f64) (result f64))) + (import "Math" "log2" (func $~lib/bindings/Math/log2 (param f64) (result f64))) + (import "Math" "max" (func $~lib/bindings/Math/max (param f64 f64) (result f64))) + (import "Math" "min" (func $~lib/bindings/Math/min (param f64 f64) (result f64))) + (import "math" "mod" (func $std/math/mod (param f64 f64) (result f64))) + (import "Math" "pow" (func $~lib/bindings/Math/pow (param f64 f64) (result f64))) + (import "Math" "random" (func $~lib/bindings/Math/random (result f64))) + (import "Math" "sign" (func $~lib/bindings/Math/sign (param f64) (result f64))) + (import "Math" "sinh" (func $~lib/bindings/Math/sinh (param f64) (result f64))) + (import "Math" "sqrt" (func $~lib/bindings/Math/sqrt (param f64) (result f64))) + (import "Math" "tanh" (func $~lib/bindings/Math/tanh (param f64) (result f64))) + (import "Math" "trunc" (func $~lib/bindings/Math/trunc (param f64) (result f64))) (global $std/math/js i32 (i32.const 1)) (global $std/math/INEXACT i32 (i32.const 1)) (global $std/math/INVALID i32 (i32.const 2)) @@ -88,12 +93,8 @@ (global $~lib/builtins/f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) (global $HEAP_BASE i32 (i32.const 68)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0b\00\00\00s\00t\00d\00/\00m\00a\00t\00h\00.\00t\00s\00") - (data (i32.const 40) "\0c\00\00\00~\00l\00i\00b\00/\00m\00a\00t\00h\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/builtins/isNaN (; 30 ;) (type $Fi) (param $0 f64) (result i32) (f64.ne @@ -736,7 +737,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.abs + (call $~lib/bindings/Math/abs (get_local $0) ) (get_local $1) @@ -1079,7 +1080,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.acos + (call $~lib/bindings/Math/acos (get_local $0) ) (get_local $1) @@ -2110,7 +2111,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.acosh + (call $~lib/bindings/Math/acosh (get_local $0) ) (get_local $1) @@ -3024,7 +3025,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.asin + (call $~lib/bindings/Math/asin (get_local $0) ) (get_local $1) @@ -3342,7 +3343,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.asinh + (call $~lib/bindings/Math/asinh (get_local $0) ) (get_local $1) @@ -3921,7 +3922,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.atan + (call $~lib/bindings/Math/atan (get_local $0) ) (get_local $1) @@ -4434,7 +4435,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.atanh + (call $~lib/bindings/Math/atanh (get_local $0) ) (get_local $1) @@ -5048,7 +5049,7 @@ ) (get_local $5) (call $std/math/check - (call $~lib/math/JSMath.atan2 + (call $~lib/bindings/Math/atan2 (get_local $0) (get_local $1) ) @@ -5737,7 +5738,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.cbrt + (call $~lib/bindings/Math/cbrt (get_local $0) ) (get_local $1) @@ -5953,7 +5954,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.ceil + (call $~lib/bindings/Math/ceil (get_local $0) ) (get_local $1) @@ -6848,7 +6849,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.cosh + (call $~lib/bindings/Math/cosh (get_local $0) ) (get_local $1) @@ -7680,7 +7681,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.exp + (call $~lib/bindings/Math/exp (get_local $0) ) (get_local $1) @@ -7722,7 +7723,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.expm1 + (call $~lib/bindings/Math/expm1 (get_local $0) ) (get_local $1) @@ -7766,7 +7767,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.floor + (call $~lib/bindings/Math/floor (get_local $0) ) (get_local $1) @@ -8106,7 +8107,7 @@ ) (get_local $5) (call $std/math/check - (call $~lib/math/JSMath.hypot + (call $~lib/bindings/Math/hypot (get_local $0) (get_local $1) ) @@ -8342,7 +8343,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.log + (call $~lib/bindings/Math/log (get_local $0) ) (get_local $1) @@ -8761,7 +8762,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.log10 + (call $~lib/bindings/Math/log10 (get_local $0) ) (get_local $1) @@ -9089,7 +9090,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.log1p + (call $~lib/bindings/Math/log1p (get_local $0) ) (get_local $1) @@ -9495,7 +9496,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.log2 + (call $~lib/bindings/Math/log2 (get_local $0) ) (get_local $1) @@ -9818,7 +9819,7 @@ ) (get_local $5) (call $std/math/check - (call $~lib/math/JSMath.max + (call $~lib/bindings/Math/max (get_local $0) (get_local $1) ) @@ -9867,7 +9868,7 @@ ) (get_local $5) (call $std/math/check - (call $~lib/math/JSMath.min + (call $~lib/bindings/Math/min (get_local $0) (get_local $1) ) @@ -10363,7 +10364,7 @@ ) (get_local $5) (call $std/math/check - (call $std/math/JSOp.mod + (call $std/math/mod (get_local $0) (get_local $1) ) @@ -12399,7 +12400,7 @@ ) (get_local $5) (call $std/math/check - (call $~lib/math/JSMath.pow + (call $~lib/bindings/Math/pow (get_local $0) (get_local $1) ) @@ -13791,7 +13792,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 40) - (i32.const 1000) + (i32.const 955) (i32.const 4) ) (unreachable) @@ -13823,7 +13824,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 40) - (i32.const 1007) + (i32.const 962) (i32.const 24) ) (unreachable) @@ -14276,7 +14277,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.sign + (call $~lib/bindings/Math/sign (get_local $0) ) (get_local $1) @@ -15570,7 +15571,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.sinh + (call $~lib/bindings/Math/sinh (get_local $0) ) (get_local $1) @@ -15734,7 +15735,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.sqrt + (call $~lib/bindings/Math/sqrt (get_local $0) ) (get_local $1) @@ -15921,7 +15922,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.tanh + (call $~lib/bindings/Math/tanh (get_local $0) ) (get_local $1) @@ -16097,7 +16098,7 @@ ) (get_local $4) (call $std/math/check - (call $~lib/math/JSMath.trunc + (call $~lib/bindings/Math/trunc (get_local $0) ) (get_local $1) @@ -16478,7 +16479,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.E) - (get_global $~lib/math/JSMath.E) + (get_global $~lib/bindings/Math/E) (f64.const 0) (i32.const 0) ) @@ -16497,7 +16498,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.LN2) - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) (f64.const 0) (i32.const 0) ) @@ -16516,7 +16517,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.LN10) - (get_global $~lib/math/JSMath.LN10) + (get_global $~lib/bindings/Math/LN10) (f64.const 0) (i32.const 0) ) @@ -16535,7 +16536,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.LOG2E) - (get_global $~lib/math/JSMath.LOG2E) + (get_global $~lib/bindings/Math/LOG2E) (f64.const 0) (i32.const 0) ) @@ -16554,7 +16555,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.PI) - (get_global $~lib/math/JSMath.PI) + (get_global $~lib/bindings/Math/PI) (f64.const 0) (i32.const 0) ) @@ -16573,7 +16574,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.SQRT1_2) - (get_global $~lib/math/JSMath.SQRT1_2) + (get_global $~lib/bindings/Math/SQRT1_2) (f64.const 0) (i32.const 0) ) @@ -16592,7 +16593,7 @@ (i32.eqz (call $std/math/check (get_global $~lib/math/NativeMath.SQRT2) - (get_global $~lib/math/JSMath.SQRT2) + (get_global $~lib/bindings/Math/SQRT2) (f64.const 0) (i32.const 0) ) @@ -16612,7 +16613,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.E) (f32.demote/f64 - (get_global $~lib/math/JSMath.E) + (get_global $~lib/bindings/Math/E) ) (f32.const 0) (i32.const 0) @@ -16633,7 +16634,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.LN2) (f32.demote/f64 - (get_global $~lib/math/JSMath.LN2) + (get_global $~lib/bindings/Math/LN2) ) (f32.const 0) (i32.const 0) @@ -16654,7 +16655,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.LN10) (f32.demote/f64 - (get_global $~lib/math/JSMath.LN10) + (get_global $~lib/bindings/Math/LN10) ) (f32.const 0) (i32.const 0) @@ -16675,7 +16676,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.LOG2E) (f32.demote/f64 - (get_global $~lib/math/JSMath.LOG2E) + (get_global $~lib/bindings/Math/LOG2E) ) (f32.const 0) (i32.const 0) @@ -16696,7 +16697,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.PI) (f32.demote/f64 - (get_global $~lib/math/JSMath.PI) + (get_global $~lib/bindings/Math/PI) ) (f32.const 0) (i32.const 0) @@ -16717,7 +16718,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.SQRT1_2) (f32.demote/f64 - (get_global $~lib/math/JSMath.SQRT1_2) + (get_global $~lib/bindings/Math/SQRT1_2) ) (f32.const 0) (i32.const 0) @@ -16738,7 +16739,7 @@ (call $std/math/check (get_global $~lib/math/NativeMathf.SQRT2) (f32.demote/f64 - (get_global $~lib/math/JSMath.SQRT2) + (get_global $~lib/bindings/Math/SQRT2) ) (f32.const 0) (i32.const 0) @@ -40219,7 +40220,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 1998) + (i32.const 1996) (i32.const 0) ) (unreachable) @@ -40239,7 +40240,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 1999) + (i32.const 1997) (i32.const 0) ) (unreachable) @@ -40259,7 +40260,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2000) + (i32.const 1998) (i32.const 0) ) (unreachable) @@ -40279,7 +40280,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2001) + (i32.const 1999) (i32.const 0) ) (unreachable) @@ -40299,7 +40300,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2002) + (i32.const 2000) (i32.const 0) ) (unreachable) @@ -40319,7 +40320,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2003) + (i32.const 2001) (i32.const 0) ) (unreachable) @@ -40339,7 +40340,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2004) + (i32.const 2002) (i32.const 0) ) (unreachable) @@ -40359,7 +40360,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2005) + (i32.const 2003) (i32.const 0) ) (unreachable) @@ -40379,7 +40380,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2006) + (i32.const 2004) (i32.const 0) ) (unreachable) @@ -40399,7 +40400,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2007) + (i32.const 2005) (i32.const 0) ) (unreachable) @@ -40415,6 +40416,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2008) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -0) + (f64.const 1) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2009) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40428,9 +40469,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0) + (f64.const -0.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -40448,9 +40489,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0.5) (f64.const 1) - (f64.const 0.5) + (f64.const 1) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -40468,9 +40509,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0.5) + (f64.const -1) (f64.const 1) - (f64.const -0.5) + (f64.const -0) (f64.const 0) (i32.const 0) ) @@ -40488,9 +40529,9 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const 1.5) (f64.const 1) - (f64.const 1) - (f64.const 0) + (f64.const 0.5) (f64.const 0) (i32.const 0) ) @@ -40508,9 +40549,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.const -1.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -40528,9 +40569,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1.5) + (f64.const 2) (f64.const 1) - (f64.const 0.5) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -40545,46 +40586,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -1.5) - (f64.const 1) - (f64.const -0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2017) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 2) - (f64.const 1) - (f64.const 0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2018) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -40599,7 +40600,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2019) + (i32.const 2017) (i32.const 0) ) (unreachable) @@ -40619,7 +40620,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2020) + (i32.const 2018) (i32.const 0) ) (unreachable) @@ -40641,7 +40642,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2021) + (i32.const 2019) (i32.const 0) ) (unreachable) @@ -40657,6 +40658,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2020) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0) + (f64.const -1) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2021) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -0) + (f64.const -1) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40670,9 +40711,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0) + (f64.const 0.5) (f64.const -1) - (f64.const 0) + (f64.const 0.5) (f64.const 0) (i32.const 0) ) @@ -40690,9 +40731,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -0) + (f64.const -0.5) (f64.const -1) - (f64.const -0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -40707,46 +40748,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2025) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2026) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -40761,7 +40762,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2027) + (i32.const 2025) (i32.const 0) ) (unreachable) @@ -40781,7 +40782,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2028) + (i32.const 2026) (i32.const 0) ) (unreachable) @@ -40801,7 +40802,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2029) + (i32.const 2027) (i32.const 0) ) (unreachable) @@ -40821,7 +40822,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2030) + (i32.const 2028) (i32.const 0) ) (unreachable) @@ -40841,7 +40842,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2031) + (i32.const 2029) (i32.const 0) ) (unreachable) @@ -40861,7 +40862,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2032) + (i32.const 2030) (i32.const 0) ) (unreachable) @@ -40881,7 +40882,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2033) + (i32.const 2031) (i32.const 0) ) (unreachable) @@ -40899,6 +40900,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2032) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2033) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const 0) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -40912,11 +40953,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -40933,10 +40974,10 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) + (f64.const inf) (f64.const 0) - (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -40953,10 +40994,12 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) - (f64.const -0) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) (f64.const 0) - (get_global $std/math/INVALID) + (f64.const 0) + (i32.const 0) ) ) (block @@ -40973,8 +41016,8 @@ (i32.eqz (call $std/math/test_mod (f64.const 0) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -40992,13 +41035,11 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const -0) (f64.const 0) - (f64.neg - (f64.const inf) - ) + (f64.const nan:0x8000000000000) (f64.const 0) - (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41014,11 +41055,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 0) - (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const -0) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41031,46 +41072,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2041) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2042) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -41085,7 +41086,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2043) + (i32.const 2041) (i32.const 0) ) (unreachable) @@ -41107,7 +41108,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2044) + (i32.const 2042) (i32.const 0) ) (unreachable) @@ -41127,7 +41128,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2045) + (i32.const 2043) (i32.const 0) ) (unreachable) @@ -41143,6 +41144,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2044) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const -1) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2045) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41156,7 +41197,9 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.neg + (f64.const inf) + ) (f64.const 0) (f64.const nan:0x8000000000000) (f64.const 0) @@ -41176,11 +41219,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41193,48 +41236,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.neg - (f64.const inf) - ) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2049) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const nan:0x8000000000000) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2050) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_mod @@ -41249,7 +41250,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2051) + (i32.const 2049) (i32.const 0) ) (unreachable) @@ -41269,7 +41270,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2052) + (i32.const 2050) (i32.const 0) ) (unreachable) @@ -41287,6 +41288,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2051) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2052) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_mod + (f64.const inf) + (f64.const 2) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41300,11 +41341,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41321,10 +41362,10 @@ (i32.eqz (call $std/math/test_mod (f64.const inf) - (f64.const 2) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41340,8 +41381,10 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const -0.5) + (f64.neg + (f64.const inf) + ) + (f64.const 2) (f64.const nan:0x8000000000000) (f64.const 0) (get_global $std/math/INVALID) @@ -41360,11 +41403,13 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) + (f64.const -0.5) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41383,10 +41428,10 @@ (f64.neg (f64.const inf) ) - (f64.const 2) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41402,13 +41447,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.neg - (f64.const inf) - ) - (f64.const -0.5) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41424,9 +41467,7 @@ (if (i32.eqz (call $std/math/test_mod - (f64.neg - (f64.const inf) - ) + (f64.const 1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) @@ -41446,7 +41487,7 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) @@ -41467,8 +41508,8 @@ (i32.eqz (call $std/math/test_mod (f64.const 1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -41487,8 +41528,8 @@ (i32.eqz (call $std/math/test_mod (f64.const -1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -41506,11 +41547,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1) (f64.const inf) - (f64.const 1) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41526,11 +41567,13 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) + (f64.neg + (f64.const inf) + ) (f64.const inf) - (f64.const -1) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41546,11 +41589,13 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 1) + (f64.neg + (f64.const inf) + ) + (f64.const 1) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41566,13 +41611,13 @@ (if (i32.eqz (call $std/math/test_mod + (f64.const -1) (f64.neg (f64.const inf) ) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41588,13 +41633,13 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const 1) + (f64.const inf) (f64.neg (f64.const inf) ) - (f64.const 1) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41610,13 +41655,15 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const -1) (f64.neg (f64.const inf) ) - (f64.const -1) + (f64.neg + (f64.const inf) + ) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -41632,13 +41679,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.const inf) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const 1.75) + (f64.const 0.5) + (f64.const 0.25) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41654,15 +41699,11 @@ (if (i32.eqz (call $std/math/test_mod - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const -1.75) + (f64.const 0.5) + (f64.const -0.25) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -41679,7 +41720,7 @@ (i32.eqz (call $std/math/test_mod (f64.const 1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const 0.25) (f64.const 0) (i32.const 0) @@ -41699,7 +41740,7 @@ (i32.eqz (call $std/math/test_mod (f64.const -1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const -0.25) (f64.const 0) (i32.const 0) @@ -41715,46 +41756,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const 1.75) - (f64.const -0.5) - (f64.const 0.25) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2074) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_mod - (f64.const -1.75) - (f64.const -0.5) - (f64.const -0.25) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2075) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -41769,7 +41770,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2084) + (i32.const 2082) (i32.const 0) ) (unreachable) @@ -41789,7 +41790,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2085) + (i32.const 2083) (i32.const 0) ) (unreachable) @@ -41809,7 +41810,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2086) + (i32.const 2084) (i32.const 0) ) (unreachable) @@ -41829,7 +41830,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2087) + (i32.const 2085) (i32.const 0) ) (unreachable) @@ -41849,7 +41850,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2088) + (i32.const 2086) (i32.const 0) ) (unreachable) @@ -41869,7 +41870,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2089) + (i32.const 2087) (i32.const 0) ) (unreachable) @@ -41889,7 +41890,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2090) + (i32.const 2088) (i32.const 0) ) (unreachable) @@ -41909,7 +41910,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2091) + (i32.const 2089) (i32.const 0) ) (unreachable) @@ -41929,7 +41930,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2092) + (i32.const 2090) (i32.const 0) ) (unreachable) @@ -41949,7 +41950,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2093) + (i32.const 2091) (i32.const 0) ) (unreachable) @@ -41965,6 +41966,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2094) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -0) + (f32.const 1) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2095) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -41978,9 +42019,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0) + (f32.const -0.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -41998,9 +42039,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0.5) (f32.const 1) - (f32.const 0.5) + (f32.const 1) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -42018,9 +42059,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0.5) + (f32.const -1) (f32.const 1) - (f32.const -0.5) + (f32.const -0) (f32.const 0) (i32.const 0) ) @@ -42038,9 +42079,9 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const 1.5) (f32.const 1) - (f32.const 1) - (f32.const 0) + (f32.const 0.5) (f32.const 0) (i32.const 0) ) @@ -42058,9 +42099,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.const -1.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -42078,9 +42119,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1.5) + (f32.const 2) (f32.const 1) - (f32.const 0.5) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -42095,46 +42136,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -1.5) - (f32.const 1) - (f32.const -0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2103) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 2) - (f32.const 1) - (f32.const 0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2104) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -42149,7 +42150,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2105) + (i32.const 2103) (i32.const 0) ) (unreachable) @@ -42169,7 +42170,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2106) + (i32.const 2104) (i32.const 0) ) (unreachable) @@ -42191,7 +42192,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2107) + (i32.const 2105) (i32.const 0) ) (unreachable) @@ -42207,6 +42208,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2106) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0) + (f32.const -1) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2107) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -0) + (f32.const -1) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42220,9 +42261,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0) + (f32.const 0.5) (f32.const -1) - (f32.const 0) + (f32.const 0.5) (f32.const 0) (i32.const 0) ) @@ -42240,9 +42281,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -0) + (f32.const -0.5) (f32.const -1) - (f32.const -0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -42257,46 +42298,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2111) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2112) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -42311,7 +42312,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2113) + (i32.const 2111) (i32.const 0) ) (unreachable) @@ -42331,7 +42332,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2114) + (i32.const 2112) (i32.const 0) ) (unreachable) @@ -42351,7 +42352,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2115) + (i32.const 2113) (i32.const 0) ) (unreachable) @@ -42371,7 +42372,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2116) + (i32.const 2114) (i32.const 0) ) (unreachable) @@ -42391,7 +42392,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2117) + (i32.const 2115) (i32.const 0) ) (unreachable) @@ -42411,7 +42412,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2118) + (i32.const 2116) (i32.const 0) ) (unreachable) @@ -42431,7 +42432,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2119) + (i32.const 2117) (i32.const 0) ) (unreachable) @@ -42449,6 +42450,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2118) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const nan:0x400000) + (f32.const -1) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2119) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42462,11 +42503,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const nan:0x400000) - (f32.const -1) + (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -42483,10 +42524,10 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) + (f32.const inf) (f32.const 0) - (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -42503,10 +42544,12 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) - (f32.const -0) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) (f32.const 0) - (get_global $std/math/INVALID) + (f32.const 0) + (i32.const 0) ) ) (block @@ -42523,8 +42566,8 @@ (i32.eqz (call $std/math/test_modf (f32.const 0) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -42542,13 +42585,11 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const -0) (f32.const 0) - (f32.neg - (f32.const inf) - ) + (f32.const nan:0x400000) (f32.const 0) - (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -42564,11 +42605,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 0) - (f32.const nan:0x400000) + (f32.const -0) + (f32.const -0) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -42581,46 +42622,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2127) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -0) - (f32.const -0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2128) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -42635,7 +42636,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2129) + (i32.const 2127) (i32.const 0) ) (unreachable) @@ -42657,7 +42658,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2130) + (i32.const 2128) (i32.const 0) ) (unreachable) @@ -42677,7 +42678,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2131) + (i32.const 2129) (i32.const 0) ) (unreachable) @@ -42693,6 +42694,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2130) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const -1) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2131) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42706,7 +42747,9 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.neg + (f32.const inf) + ) (f32.const 0) (f32.const nan:0x400000) (f32.const 0) @@ -42726,11 +42769,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -42743,48 +42786,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.neg - (f32.const inf) - ) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2135) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const nan:0x400000) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2136) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_modf @@ -42799,7 +42800,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2137) + (i32.const 2135) (i32.const 0) ) (unreachable) @@ -42819,7 +42820,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2138) + (i32.const 2136) (i32.const 0) ) (unreachable) @@ -42837,6 +42838,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2137) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const nan:0x400000) + (f32.const -0) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2138) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_modf + (f32.const inf) + (f32.const 2) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -42850,11 +42891,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const nan:0x400000) - (f32.const -0) + (f32.const inf) + (f32.const -0.5) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -42871,10 +42912,10 @@ (i32.eqz (call $std/math/test_modf (f32.const inf) - (f32.const 2) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -42890,8 +42931,10 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const -0.5) + (f32.neg + (f32.const inf) + ) + (f32.const 2) (f32.const nan:0x400000) (f32.const 0) (get_global $std/math/INVALID) @@ -42910,11 +42953,13 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) + (f32.const -0.5) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -42933,10 +42978,10 @@ (f32.neg (f32.const inf) ) - (f32.const 2) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -42952,13 +42997,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.neg - (f32.const inf) - ) - (f32.const -0.5) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -42974,9 +43017,7 @@ (if (i32.eqz (call $std/math/test_modf - (f32.neg - (f32.const inf) - ) + (f32.const 1) (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) @@ -42996,7 +43037,7 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const nan:0x400000) + (f32.const -1) (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) @@ -43017,8 +43058,8 @@ (i32.eqz (call $std/math/test_modf (f32.const 1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -43037,8 +43078,8 @@ (i32.eqz (call $std/math/test_modf (f32.const -1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -43056,11 +43097,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1) (f32.const inf) - (f32.const 1) + (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -43076,11 +43117,13 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) + (f32.neg + (f32.const inf) + ) (f32.const inf) - (f32.const -1) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -43096,11 +43139,13 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 1) + (f32.neg + (f32.const inf) + ) + (f32.const 1) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -43116,13 +43161,13 @@ (if (i32.eqz (call $std/math/test_modf + (f32.const -1) (f32.neg (f32.const inf) ) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const -1) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -43138,13 +43183,13 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const 1) + (f32.const inf) (f32.neg (f32.const inf) ) - (f32.const 1) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -43160,13 +43205,15 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const -1) (f32.neg (f32.const inf) ) - (f32.const -1) + (f32.neg + (f32.const inf) + ) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -43182,13 +43229,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.const inf) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const 1.75) + (f32.const 0.5) + (f32.const 0.25) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -43204,15 +43249,11 @@ (if (i32.eqz (call $std/math/test_modf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const -1.75) + (f32.const 0.5) + (f32.const -0.25) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -43229,7 +43270,7 @@ (i32.eqz (call $std/math/test_modf (f32.const 1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const 0.25) (f32.const 0) (i32.const 0) @@ -43249,7 +43290,7 @@ (i32.eqz (call $std/math/test_modf (f32.const -1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const -0.25) (f32.const 0) (i32.const 0) @@ -43265,46 +43306,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const 1.75) - (f32.const -0.5) - (f32.const 0.25) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2160) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_modf - (f32.const -1.75) - (f32.const -0.5) - (f32.const -0.25) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2161) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -43319,7 +43320,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2173) + (i32.const 2171) (i32.const 0) ) (unreachable) @@ -43339,7 +43340,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2174) + (i32.const 2172) (i32.const 0) ) (unreachable) @@ -43359,7 +43360,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2175) + (i32.const 2173) (i32.const 0) ) (unreachable) @@ -43379,7 +43380,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2176) + (i32.const 2174) (i32.const 0) ) (unreachable) @@ -43399,7 +43400,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2177) + (i32.const 2175) (i32.const 0) ) (unreachable) @@ -43419,7 +43420,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2178) + (i32.const 2176) (i32.const 0) ) (unreachable) @@ -43439,7 +43440,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2179) + (i32.const 2177) (i32.const 0) ) (unreachable) @@ -43459,7 +43460,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2180) + (i32.const 2178) (i32.const 0) ) (unreachable) @@ -43479,7 +43480,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2181) + (i32.const 2179) (i32.const 0) ) (unreachable) @@ -43499,7 +43500,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2182) + (i32.const 2180) (i32.const 0) ) (unreachable) @@ -43519,7 +43520,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2185) + (i32.const 2183) (i32.const 0) ) (unreachable) @@ -43539,7 +43540,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2186) + (i32.const 2184) (i32.const 0) ) (unreachable) @@ -43559,7 +43560,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2187) + (i32.const 2185) (i32.const 0) ) (unreachable) @@ -43579,7 +43580,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2188) + (i32.const 2186) (i32.const 0) ) (unreachable) @@ -43599,7 +43600,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2189) + (i32.const 2187) (i32.const 0) ) (unreachable) @@ -43619,7 +43620,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2190) + (i32.const 2188) (i32.const 0) ) (unreachable) @@ -43639,7 +43640,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2191) + (i32.const 2189) (i32.const 0) ) (unreachable) @@ -43659,7 +43660,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2192) + (i32.const 2190) (i32.const 0) ) (unreachable) @@ -43679,7 +43680,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2193) + (i32.const 2191) (i32.const 0) ) (unreachable) @@ -43699,7 +43700,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2194) + (i32.const 2192) (i32.const 0) ) (unreachable) @@ -43719,7 +43720,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2195) + (i32.const 2193) (i32.const 0) ) (unreachable) @@ -43739,7 +43740,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2196) + (i32.const 2194) (i32.const 0) ) (unreachable) @@ -43759,7 +43760,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2197) + (i32.const 2195) (i32.const 0) ) (unreachable) @@ -43781,7 +43782,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2198) + (i32.const 2196) (i32.const 0) ) (unreachable) @@ -43801,7 +43802,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2199) + (i32.const 2197) (i32.const 0) ) (unreachable) @@ -43821,7 +43822,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2200) + (i32.const 2198) (i32.const 0) ) (unreachable) @@ -43841,7 +43842,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2201) + (i32.const 2199) (i32.const 0) ) (unreachable) @@ -43861,7 +43862,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2202) + (i32.const 2200) (i32.const 0) ) (unreachable) @@ -43881,7 +43882,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2203) + (i32.const 2201) (i32.const 0) ) (unreachable) @@ -43897,6 +43898,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2202) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const 0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2203) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -43907,46 +43948,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2205) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0) - (f64.const -0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2206) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -43961,7 +43962,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2207) + (i32.const 2205) (i32.const 0) ) (unreachable) @@ -43979,6 +43980,48 @@ (get_global $std/math/DIVBYZERO) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2206) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const -2) + (f64.const inf) + (f64.const 0) + (get_global $std/math/DIVBYZERO) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2207) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0) + (f64.const -3) + (f64.neg + (f64.const inf) + ) + (f64.const 0) + (get_global $std/math/DIVBYZERO) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -43993,7 +44036,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -0) - (f64.const -2) + (f64.const -4) (f64.const inf) (f64.const 0) (get_global $std/math/DIVBYZERO) @@ -44013,12 +44056,12 @@ (i32.eqz (call $std/math/test_pow (f64.const -0) - (f64.const -3) (f64.neg (f64.const inf) ) + (f64.const inf) (f64.const 0) - (get_global $std/math/DIVBYZERO) + (i32.const 0) ) ) (block @@ -44034,11 +44077,11 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -0) - (f64.const -4) - (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/DIVBYZERO) + (f64.const 1) + (f64.const 0) + (i32.const 0) ) ) (block @@ -44054,12 +44097,10 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -0) - (f64.neg - (f64.const inf) - ) (f64.const inf) (f64.const 0) + (f64.const 1) + (f64.const 0) (i32.const 0) ) ) @@ -44076,7 +44117,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) (f64.const 0) (f64.const 1) (f64.const 0) @@ -44096,7 +44139,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const inf) + (f64.const 1) (f64.const 0) (f64.const 1) (f64.const 0) @@ -44116,9 +44159,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.neg - (f64.const inf) - ) + (f64.const -1) (f64.const 0) (f64.const 1) (f64.const 0) @@ -44138,7 +44179,7 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1) + (f64.const -0.5) (f64.const 0) (f64.const 1) (f64.const 0) @@ -44155,46 +44196,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -1) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2217) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const -0.5) - (f64.const 0) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2218) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -44209,7 +44210,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2219) + (i32.const 2217) (i32.const 0) ) (unreachable) @@ -44229,7 +44230,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2220) + (i32.const 2218) (i32.const 0) ) (unreachable) @@ -44251,7 +44252,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2221) + (i32.const 2219) (i32.const 0) ) (unreachable) @@ -44267,6 +44268,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2220) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -1) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2221) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const -0.5) + (f64.const -0) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -44281,8 +44322,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -0) - (f64.const 1) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44300,9 +44341,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -0.5) - (f64.const -0) - (f64.const 1) + (f64.const -1) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44321,7 +44362,9 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) @@ -44341,8 +44384,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 2) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -44361,10 +44404,8 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -44383,7 +44424,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const 2) + (f64.const -2) (f64.const 1) (f64.const 0) (i32.const 0) @@ -44403,7 +44444,7 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -1) + (f64.const -3) (f64.const -1) (f64.const 0) (i32.const 0) @@ -44423,10 +44464,10 @@ (i32.eqz (call $std/math/test_pow (f64.const -1) - (f64.const -2) - (f64.const 1) + (f64.const 0.5) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -44442,9 +44483,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -1) - (f64.const -3) - (f64.const -1) + (f64.const 1) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44462,11 +44503,11 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const -1) - (f64.const 0.5) + (f64.const 1) + (f64.const inf) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -44483,7 +44524,9 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) @@ -44503,8 +44546,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 3) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -44523,10 +44566,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const 0.5) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -44545,7 +44586,7 @@ (i32.eqz (call $std/math/test_pow (f64.const 1) - (f64.const 3) + (f64.const -0.5) (f64.const 1) (f64.const 0) (i32.const 0) @@ -44561,46 +44602,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 1) - (f64.const 0.5) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2237) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const 1) - (f64.const -0.5) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2238) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -44615,7 +44616,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2239) + (i32.const 2237) (i32.const 0) ) (unreachable) @@ -44635,7 +44636,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2240) + (i32.const 2238) (i32.const 0) ) (unreachable) @@ -44655,7 +44656,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2241) + (i32.const 2239) (i32.const 0) ) (unreachable) @@ -44675,7 +44676,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2242) + (i32.const 2240) (i32.const 0) ) (unreachable) @@ -44695,7 +44696,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2243) + (i32.const 2241) (i32.const 0) ) (unreachable) @@ -44715,7 +44716,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2244) + (i32.const 2242) (i32.const 0) ) (unreachable) @@ -44737,7 +44738,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2245) + (i32.const 2243) (i32.const 0) ) (unreachable) @@ -44753,6 +44754,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2244) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0.5) + (f64.const inf) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2245) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.const 0.5) + (f64.neg + (f64.const inf) + ) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -44767,8 +44810,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 0.5) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44786,10 +44829,8 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 0.5) - (f64.neg - (f64.const inf) - ) + (f64.const 1.5) + (f64.const inf) (f64.const inf) (f64.const 0) (i32.const 0) @@ -44808,9 +44849,11 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 0.5) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const 1.5) + (f64.neg + (f64.const inf) + ) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -44829,8 +44872,8 @@ (i32.eqz (call $std/math/test_pow (f64.const 1.5) - (f64.const inf) - (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44848,11 +44891,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1.5) - (f64.neg - (f64.const inf) - ) - (f64.const 0) + (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -44870,9 +44911,9 @@ (if (i32.eqz (call $std/math/test_pow - (f64.const 1.5) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const inf) + (f64.const inf) (f64.const 0) (i32.const 0) ) @@ -44887,46 +44928,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const inf) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2253) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.const inf) - (f64.const inf) - (f64.const inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2254) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -44943,7 +44944,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2255) + (i32.const 2253) (i32.const 0) ) (unreachable) @@ -44963,7 +44964,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2256) + (i32.const 2254) (i32.const 0) ) (unreachable) @@ -44983,7 +44984,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2257) + (i32.const 2255) (i32.const 0) ) (unreachable) @@ -45003,7 +45004,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2258) + (i32.const 2256) (i32.const 0) ) (unreachable) @@ -45023,7 +45024,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2259) + (i32.const 2257) (i32.const 0) ) (unreachable) @@ -45043,7 +45044,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2260) + (i32.const 2258) (i32.const 0) ) (unreachable) @@ -45063,7 +45064,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2261) + (i32.const 2259) (i32.const 0) ) (unreachable) @@ -45079,6 +45080,50 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2260) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.neg + (f64.const inf) + ) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2261) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_pow + (f64.neg + (f64.const inf) + ) + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45095,8 +45140,10 @@ (f64.neg (f64.const inf) ) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -45117,8 +45164,10 @@ (f64.neg (f64.const inf) ) - (f64.const inf) - (f64.const inf) + (f64.const 3) + (f64.neg + (f64.const inf) + ) (f64.const 0) (i32.const 0) ) @@ -45139,10 +45188,8 @@ (f64.neg (f64.const inf) ) - (f64.neg - (f64.const inf) - ) - (f64.const 0) + (f64.const 2) + (f64.const inf) (f64.const 0) (i32.const 0) ) @@ -45163,7 +45210,7 @@ (f64.neg (f64.const inf) ) - (f64.const 3) + (f64.const 1) (f64.neg (f64.const inf) ) @@ -45187,7 +45234,7 @@ (f64.neg (f64.const inf) ) - (f64.const 2) + (f64.const 0.5) (f64.const inf) (f64.const 0) (i32.const 0) @@ -45203,52 +45250,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.neg - (f64.const inf) - ) - (f64.const 1) - (f64.neg - (f64.const inf) - ) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2268) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_pow - (f64.neg - (f64.const inf) - ) - (f64.const 0.5) - (f64.const inf) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2269) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_pow @@ -45265,7 +45266,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2270) + (i32.const 2268) (i32.const 0) ) (unreachable) @@ -45287,7 +45288,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2271) + (i32.const 2269) (i32.const 0) ) (unreachable) @@ -45309,7 +45310,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2272) + (i32.const 2270) (i32.const 0) ) (unreachable) @@ -45329,7 +45330,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2273) + (i32.const 2271) (i32.const 0) ) (unreachable) @@ -45349,7 +45350,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2274) + (i32.const 2272) (i32.const 0) ) (unreachable) @@ -45369,7 +45370,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2275) + (i32.const 2273) (i32.const 0) ) (unreachable) @@ -45389,7 +45390,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2276) + (i32.const 2274) (i32.const 0) ) (unreachable) @@ -45409,7 +45410,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2285) + (i32.const 2283) (i32.const 0) ) (unreachable) @@ -45429,7 +45430,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2286) + (i32.const 2284) (i32.const 0) ) (unreachable) @@ -45449,7 +45450,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2287) + (i32.const 2285) (i32.const 0) ) (unreachable) @@ -45469,7 +45470,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2288) + (i32.const 2286) (i32.const 0) ) (unreachable) @@ -45489,7 +45490,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2289) + (i32.const 2287) (i32.const 0) ) (unreachable) @@ -45509,7 +45510,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2290) + (i32.const 2288) (i32.const 0) ) (unreachable) @@ -45529,7 +45530,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2291) + (i32.const 2289) (i32.const 0) ) (unreachable) @@ -45549,7 +45550,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2292) + (i32.const 2290) (i32.const 0) ) (unreachable) @@ -45569,7 +45570,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2293) + (i32.const 2291) (i32.const 0) ) (unreachable) @@ -45589,7 +45590,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2294) + (i32.const 2292) (i32.const 0) ) (unreachable) @@ -45609,7 +45610,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2297) + (i32.const 2295) (i32.const 0) ) (unreachable) @@ -45629,7 +45630,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2298) + (i32.const 2296) (i32.const 0) ) (unreachable) @@ -45649,7 +45650,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2299) + (i32.const 2297) (i32.const 0) ) (unreachable) @@ -45669,7 +45670,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2300) + (i32.const 2298) (i32.const 0) ) (unreachable) @@ -45689,7 +45690,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2301) + (i32.const 2299) (i32.const 0) ) (unreachable) @@ -45709,7 +45710,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2302) + (i32.const 2300) (i32.const 0) ) (unreachable) @@ -45729,7 +45730,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2303) + (i32.const 2301) (i32.const 0) ) (unreachable) @@ -45749,7 +45750,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2304) + (i32.const 2302) (i32.const 0) ) (unreachable) @@ -45769,7 +45770,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2305) + (i32.const 2303) (i32.const 0) ) (unreachable) @@ -45789,7 +45790,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2306) + (i32.const 2304) (i32.const 0) ) (unreachable) @@ -45809,7 +45810,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2307) + (i32.const 2305) (i32.const 0) ) (unreachable) @@ -45829,7 +45830,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2308) + (i32.const 2306) (i32.const 0) ) (unreachable) @@ -45849,7 +45850,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2309) + (i32.const 2307) (i32.const 0) ) (unreachable) @@ -45871,7 +45872,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2310) + (i32.const 2308) (i32.const 0) ) (unreachable) @@ -45891,7 +45892,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2311) + (i32.const 2309) (i32.const 0) ) (unreachable) @@ -45911,7 +45912,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2312) + (i32.const 2310) (i32.const 0) ) (unreachable) @@ -45931,7 +45932,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2313) + (i32.const 2311) (i32.const 0) ) (unreachable) @@ -45951,7 +45952,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2314) + (i32.const 2312) (i32.const 0) ) (unreachable) @@ -45971,7 +45972,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2315) + (i32.const 2313) (i32.const 0) ) (unreachable) @@ -45987,6 +45988,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2314) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const 0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2315) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -45997,46 +46038,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2317) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0) - (f32.const -0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2318) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -46051,7 +46052,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2319) + (i32.const 2317) (i32.const 0) ) (unreachable) @@ -46069,6 +46070,48 @@ (get_global $std/math/DIVBYZERO) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2318) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const -2) + (f32.const inf) + (f32.const 0) + (get_global $std/math/DIVBYZERO) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2319) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0) + (f32.const -3) + (f32.neg + (f32.const inf) + ) + (f32.const 0) + (get_global $std/math/DIVBYZERO) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -46083,7 +46126,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -0) - (f32.const -2) + (f32.const -4) (f32.const inf) (f32.const 0) (get_global $std/math/DIVBYZERO) @@ -46103,12 +46146,12 @@ (i32.eqz (call $std/math/test_powf (f32.const -0) - (f32.const -3) (f32.neg (f32.const inf) ) + (f32.const inf) (f32.const 0) - (get_global $std/math/DIVBYZERO) + (i32.const 0) ) ) (block @@ -46124,11 +46167,11 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -0) - (f32.const -4) - (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/DIVBYZERO) + (f32.const 1) + (f32.const 0) + (i32.const 0) ) ) (block @@ -46144,12 +46187,10 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -0) - (f32.neg - (f32.const inf) - ) (f32.const inf) (f32.const 0) + (f32.const 1) + (f32.const 0) (i32.const 0) ) ) @@ -46166,7 +46207,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) (f32.const 0) (f32.const 1) (f32.const 0) @@ -46186,7 +46229,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const inf) + (f32.const 1) (f32.const 0) (f32.const 1) (f32.const 0) @@ -46206,9 +46249,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.neg - (f32.const inf) - ) + (f32.const -1) (f32.const 0) (f32.const 1) (f32.const 0) @@ -46228,7 +46269,7 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1) + (f32.const -0.5) (f32.const 0) (f32.const 1) (f32.const 0) @@ -46245,46 +46286,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -1) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2329) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const -0.5) - (f32.const 0) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2330) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -46299,7 +46300,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2331) + (i32.const 2329) (i32.const 0) ) (unreachable) @@ -46319,7 +46320,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2332) + (i32.const 2330) (i32.const 0) ) (unreachable) @@ -46341,7 +46342,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2333) + (i32.const 2331) (i32.const 0) ) (unreachable) @@ -46357,6 +46358,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2332) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -1) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2333) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const -0.5) + (f32.const -0) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -46371,8 +46412,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -0) - (f32.const 1) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46390,9 +46431,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -0.5) - (f32.const -0) - (f32.const 1) + (f32.const -1) + (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46411,7 +46452,9 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) (f32.const nan:0x400000) (f32.const 0) (i32.const 0) @@ -46431,8 +46474,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 2) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -46451,10 +46494,8 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const -1) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -46473,7 +46514,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const 2) + (f32.const -2) (f32.const 1) (f32.const 0) (i32.const 0) @@ -46493,7 +46534,7 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -1) + (f32.const -3) (f32.const -1) (f32.const 0) (i32.const 0) @@ -46513,10 +46554,10 @@ (i32.eqz (call $std/math/test_powf (f32.const -1) - (f32.const -2) - (f32.const 1) + (f32.const 0.5) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -46532,9 +46573,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -1) - (f32.const -3) - (f32.const -1) + (f32.const 1) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46552,11 +46593,11 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const -1) - (f32.const 0.5) + (f32.const 1) + (f32.const inf) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -46573,7 +46614,9 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) (f32.const nan:0x400000) (f32.const 0) (i32.const 0) @@ -46593,8 +46636,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 3) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -46613,10 +46656,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const 0.5) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -46635,7 +46676,7 @@ (i32.eqz (call $std/math/test_powf (f32.const 1) - (f32.const 3) + (f32.const -0.5) (f32.const 1) (f32.const 0) (i32.const 0) @@ -46651,46 +46692,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 1) - (f32.const 0.5) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2349) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const 1) - (f32.const -0.5) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2350) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -46705,7 +46706,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2351) + (i32.const 2349) (i32.const 0) ) (unreachable) @@ -46725,7 +46726,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2352) + (i32.const 2350) (i32.const 0) ) (unreachable) @@ -46745,7 +46746,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2353) + (i32.const 2351) (i32.const 0) ) (unreachable) @@ -46765,7 +46766,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2354) + (i32.const 2352) (i32.const 0) ) (unreachable) @@ -46785,7 +46786,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2355) + (i32.const 2353) (i32.const 0) ) (unreachable) @@ -46805,7 +46806,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2356) + (i32.const 2354) (i32.const 0) ) (unreachable) @@ -46827,7 +46828,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2357) + (i32.const 2355) (i32.const 0) ) (unreachable) @@ -46843,6 +46844,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2356) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0.5) + (f32.const inf) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2357) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.const 0.5) + (f32.neg + (f32.const inf) + ) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -46857,8 +46900,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 0.5) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46876,10 +46919,8 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 0.5) - (f32.neg - (f32.const inf) - ) + (f32.const 1.5) + (f32.const inf) (f32.const inf) (f32.const 0) (i32.const 0) @@ -46898,9 +46939,11 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 0.5) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const 1.5) + (f32.neg + (f32.const inf) + ) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -46919,8 +46962,8 @@ (i32.eqz (call $std/math/test_powf (f32.const 1.5) - (f32.const inf) - (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46938,11 +46981,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1.5) - (f32.neg - (f32.const inf) - ) - (f32.const 0) + (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -46960,9 +47001,9 @@ (if (i32.eqz (call $std/math/test_powf - (f32.const 1.5) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const inf) + (f32.const inf) (f32.const 0) (i32.const 0) ) @@ -46977,46 +47018,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const inf) - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2365) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.const inf) - (f32.const inf) - (f32.const inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2366) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -47033,7 +47034,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2367) + (i32.const 2365) (i32.const 0) ) (unreachable) @@ -47053,7 +47054,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2368) + (i32.const 2366) (i32.const 0) ) (unreachable) @@ -47073,7 +47074,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2369) + (i32.const 2367) (i32.const 0) ) (unreachable) @@ -47093,7 +47094,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2370) + (i32.const 2368) (i32.const 0) ) (unreachable) @@ -47113,7 +47114,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2371) + (i32.const 2369) (i32.const 0) ) (unreachable) @@ -47133,7 +47134,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2372) + (i32.const 2370) (i32.const 0) ) (unreachable) @@ -47153,7 +47154,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2373) + (i32.const 2371) (i32.const 0) ) (unreachable) @@ -47169,6 +47170,50 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2372) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.neg + (f32.const inf) + ) + (f32.const nan:0x400000) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2373) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_powf + (f32.neg + (f32.const inf) + ) + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -47185,8 +47230,10 @@ (f32.neg (f32.const inf) ) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -47207,8 +47254,10 @@ (f32.neg (f32.const inf) ) - (f32.const inf) - (f32.const inf) + (f32.const 3) + (f32.neg + (f32.const inf) + ) (f32.const 0) (i32.const 0) ) @@ -47229,10 +47278,8 @@ (f32.neg (f32.const inf) ) - (f32.neg - (f32.const inf) - ) - (f32.const 0) + (f32.const 2) + (f32.const inf) (f32.const 0) (i32.const 0) ) @@ -47253,7 +47300,7 @@ (f32.neg (f32.const inf) ) - (f32.const 3) + (f32.const 1) (f32.neg (f32.const inf) ) @@ -47277,7 +47324,7 @@ (f32.neg (f32.const inf) ) - (f32.const 2) + (f32.const 0.5) (f32.const inf) (f32.const 0) (i32.const 0) @@ -47293,52 +47340,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.neg - (f32.const inf) - ) - (f32.const 1) - (f32.neg - (f32.const inf) - ) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2380) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_powf - (f32.neg - (f32.const inf) - ) - (f32.const 0.5) - (f32.const inf) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2381) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_powf @@ -47355,7 +47356,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2382) + (i32.const 2380) (i32.const 0) ) (unreachable) @@ -47377,7 +47378,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2383) + (i32.const 2381) (i32.const 0) ) (unreachable) @@ -47399,7 +47400,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2384) + (i32.const 2382) (i32.const 0) ) (unreachable) @@ -47419,7 +47420,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2385) + (i32.const 2383) (i32.const 0) ) (unreachable) @@ -47439,7 +47440,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2386) + (i32.const 2384) (i32.const 0) ) (unreachable) @@ -47459,7 +47460,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2387) + (i32.const 2385) (i32.const 0) ) (unreachable) @@ -47479,7 +47480,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2388) + (i32.const 2386) (i32.const 0) ) (unreachable) @@ -47487,7 +47488,7 @@ ) (call $~lib/math/NativeMath.seedRandom (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (block $break|0 @@ -47529,7 +47530,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2397) + (i32.const 2395) (i32.const 2) ) (unreachable) @@ -47548,7 +47549,7 @@ (block $~lib/math/NativeMathf.seedRandom|inlined.0 (set_local $3 (i64.reinterpret/f64 - (call $~lib/math/JSMath.random) + (call $~lib/bindings/Math/random) ) ) (call $~lib/math/NativeMath.seedRandom @@ -47594,7 +47595,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2405) + (i32.const 2403) (i32.const 2) ) (unreachable) @@ -47623,7 +47624,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2419) + (i32.const 2417) (i32.const 0) ) (unreachable) @@ -47642,7 +47643,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2420) + (i32.const 2418) (i32.const 0) ) (unreachable) @@ -47661,7 +47662,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2421) + (i32.const 2419) (i32.const 0) ) (unreachable) @@ -47680,7 +47681,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2422) + (i32.const 2420) (i32.const 0) ) (unreachable) @@ -47699,7 +47700,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2423) + (i32.const 2421) (i32.const 0) ) (unreachable) @@ -47718,7 +47719,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2424) + (i32.const 2422) (i32.const 0) ) (unreachable) @@ -47737,7 +47738,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2425) + (i32.const 2423) (i32.const 0) ) (unreachable) @@ -47756,7 +47757,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2426) + (i32.const 2424) (i32.const 0) ) (unreachable) @@ -47775,7 +47776,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2427) + (i32.const 2425) (i32.const 0) ) (unreachable) @@ -47794,7 +47795,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2428) + (i32.const 2426) (i32.const 0) ) (unreachable) @@ -47809,6 +47810,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2429) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_round + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2430) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_round + (f64.neg + (f64.const inf) + ) + (f64.neg + (f64.const inf) + ) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -47822,8 +47865,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const inf) - (f64.const inf) + (f64.const 0) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -47841,12 +47884,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) + (f64.const -0) + (f64.const -0) (f64.const 0) (i32.const 0) ) @@ -47864,8 +47903,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -47883,8 +47922,8 @@ (if (i32.eqz (call $std/math/test_round - (f64.const -0) - (f64.const -0) + (f64.const -1) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -47899,44 +47938,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_round - (f64.const 1) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2436) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_round - (f64.const -1) - (f64.const -1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2437) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_round @@ -47950,7 +47951,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2438) + (i32.const 2436) (i32.const 0) ) (unreachable) @@ -47969,7 +47970,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2439) + (i32.const 2437) (i32.const 0) ) (unreachable) @@ -47988,7 +47989,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2440) + (i32.const 2438) (i32.const 0) ) (unreachable) @@ -48007,7 +48008,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2441) + (i32.const 2439) (i32.const 0) ) (unreachable) @@ -48026,7 +48027,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2442) + (i32.const 2440) (i32.const 0) ) (unreachable) @@ -48045,7 +48046,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2443) + (i32.const 2441) (i32.const 0) ) (unreachable) @@ -48064,7 +48065,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2444) + (i32.const 2442) (i32.const 0) ) (unreachable) @@ -48083,7 +48084,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2445) + (i32.const 2443) (i32.const 0) ) (unreachable) @@ -48102,7 +48103,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2446) + (i32.const 2444) (i32.const 0) ) (unreachable) @@ -48121,7 +48122,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2447) + (i32.const 2445) (i32.const 0) ) (unreachable) @@ -48140,7 +48141,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2456) + (i32.const 2454) (i32.const 0) ) (unreachable) @@ -48159,7 +48160,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2457) + (i32.const 2455) (i32.const 0) ) (unreachable) @@ -48178,7 +48179,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2458) + (i32.const 2456) (i32.const 0) ) (unreachable) @@ -48197,7 +48198,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2459) + (i32.const 2457) (i32.const 0) ) (unreachable) @@ -48216,7 +48217,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2460) + (i32.const 2458) (i32.const 0) ) (unreachable) @@ -48235,7 +48236,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2461) + (i32.const 2459) (i32.const 0) ) (unreachable) @@ -48254,7 +48255,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2462) + (i32.const 2460) (i32.const 0) ) (unreachable) @@ -48273,7 +48274,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2463) + (i32.const 2461) (i32.const 0) ) (unreachable) @@ -48292,7 +48293,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2464) + (i32.const 2462) (i32.const 0) ) (unreachable) @@ -48311,7 +48312,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2465) + (i32.const 2463) (i32.const 0) ) (unreachable) @@ -48326,6 +48327,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2466) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_roundf + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2467) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_roundf + (f32.neg + (f32.const inf) + ) + (f32.neg + (f32.const inf) + ) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48339,8 +48382,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const inf) - (f32.const inf) + (f32.const 0) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -48358,12 +48401,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) + (f32.const -0) + (f32.const -0) (f32.const 0) (i32.const 0) ) @@ -48381,8 +48420,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -48400,8 +48439,8 @@ (if (i32.eqz (call $std/math/test_roundf - (f32.const -0) - (f32.const -0) + (f32.const -1) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -48416,44 +48455,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_roundf - (f32.const 1) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2473) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_roundf - (f32.const -1) - (f32.const -1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2474) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_roundf @@ -48467,7 +48468,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2475) + (i32.const 2473) (i32.const 0) ) (unreachable) @@ -48486,7 +48487,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2476) + (i32.const 2474) (i32.const 0) ) (unreachable) @@ -48505,7 +48506,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2477) + (i32.const 2475) (i32.const 0) ) (unreachable) @@ -48524,7 +48525,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2478) + (i32.const 2476) (i32.const 0) ) (unreachable) @@ -48543,7 +48544,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2479) + (i32.const 2477) (i32.const 0) ) (unreachable) @@ -48562,7 +48563,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2480) + (i32.const 2478) (i32.const 0) ) (unreachable) @@ -48581,7 +48582,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2481) + (i32.const 2479) (i32.const 0) ) (unreachable) @@ -48600,7 +48601,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2482) + (i32.const 2480) (i32.const 0) ) (unreachable) @@ -48619,7 +48620,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2483) + (i32.const 2481) (i32.const 0) ) (unreachable) @@ -48638,7 +48639,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2484) + (i32.const 2482) (i32.const 0) ) (unreachable) @@ -48653,6 +48654,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2493) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sign + (f64.const -0) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2494) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sign + (f64.const 1) + (f64.const 1) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48663,44 +48702,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sign - (f64.const -0) - (f64.const -0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2496) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sign - (f64.const 1) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2497) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sign @@ -48714,7 +48715,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2498) + (i32.const 2496) (i32.const 0) ) (unreachable) @@ -48733,7 +48734,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2499) + (i32.const 2497) (i32.const 0) ) (unreachable) @@ -48752,7 +48753,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2500) + (i32.const 2498) (i32.const 0) ) (unreachable) @@ -48771,7 +48772,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2501) + (i32.const 2499) (i32.const 0) ) (unreachable) @@ -48792,7 +48793,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2502) + (i32.const 2500) (i32.const 0) ) (unreachable) @@ -48811,7 +48812,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2503) + (i32.const 2501) (i32.const 0) ) (unreachable) @@ -48826,6 +48827,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2509) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_signf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2510) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_signf + (f32.const 1) + (f32.const 1) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -48836,44 +48875,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_signf - (f32.const -0) - (f32.const -0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2512) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_signf - (f32.const 1) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2513) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_signf @@ -48887,7 +48888,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2514) + (i32.const 2512) (i32.const 0) ) (unreachable) @@ -48906,7 +48907,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2515) + (i32.const 2513) (i32.const 0) ) (unreachable) @@ -48925,7 +48926,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2516) + (i32.const 2514) (i32.const 0) ) (unreachable) @@ -48944,7 +48945,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2517) + (i32.const 2515) (i32.const 0) ) (unreachable) @@ -48965,7 +48966,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2518) + (i32.const 2516) (i32.const 0) ) (unreachable) @@ -48984,7 +48985,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2519) + (i32.const 2517) (i32.const 0) ) (unreachable) @@ -49004,7 +49005,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2530) + (i32.const 2528) (i32.const 0) ) (unreachable) @@ -49024,7 +49025,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2531) + (i32.const 2529) (i32.const 0) ) (unreachable) @@ -49044,7 +49045,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2532) + (i32.const 2530) (i32.const 0) ) (unreachable) @@ -49064,7 +49065,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2533) + (i32.const 2531) (i32.const 0) ) (unreachable) @@ -49084,7 +49085,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2534) + (i32.const 2532) (i32.const 0) ) (unreachable) @@ -49104,7 +49105,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2535) + (i32.const 2533) (i32.const 0) ) (unreachable) @@ -49124,7 +49125,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2536) + (i32.const 2534) (i32.const 0) ) (unreachable) @@ -49144,7 +49145,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2537) + (i32.const 2535) (i32.const 0) ) (unreachable) @@ -49164,7 +49165,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2538) + (i32.const 2536) (i32.const 0) ) (unreachable) @@ -49184,7 +49185,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2539) + (i32.const 2537) (i32.const 0) ) (unreachable) @@ -49200,6 +49201,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2540) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -0) + (f64.const 1) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2541) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -49213,9 +49254,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0) + (f64.const -0.5) (f64.const 1) - (f64.const -0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -49233,9 +49274,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0.5) (f64.const 1) - (f64.const 0.5) + (f64.const 1) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -49253,9 +49294,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0.5) + (f64.const -1) (f64.const 1) - (f64.const -0.5) + (f64.const -0) (f64.const 0) (i32.const 0) ) @@ -49273,9 +49314,9 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const 1.5) (f64.const 1) - (f64.const 1) - (f64.const 0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -49293,9 +49334,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.const -1.5) (f64.const 1) - (f64.const -0) + (f64.const 0.5) (f64.const 0) (i32.const 0) ) @@ -49313,9 +49354,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1.5) + (f64.const 2) (f64.const 1) - (f64.const -0.5) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -49330,46 +49371,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -1.5) - (f64.const 1) - (f64.const 0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2549) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 2) - (f64.const 1) - (f64.const 0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2550) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -49384,7 +49385,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2551) + (i32.const 2549) (i32.const 0) ) (unreachable) @@ -49404,7 +49405,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2552) + (i32.const 2550) (i32.const 0) ) (unreachable) @@ -49426,7 +49427,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2553) + (i32.const 2551) (i32.const 0) ) (unreachable) @@ -49442,6 +49443,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2552) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0) + (f64.const -1) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2553) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -0) + (f64.const -1) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -49455,9 +49496,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0) + (f64.const 0.5) (f64.const -1) - (f64.const 0) + (f64.const 0.5) (f64.const 0) (i32.const 0) ) @@ -49475,9 +49516,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -0) + (f64.const -0.5) (f64.const -1) - (f64.const -0) + (f64.const -0.5) (f64.const 0) (i32.const 0) ) @@ -49492,46 +49533,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2557) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2558) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -49546,7 +49547,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2559) + (i32.const 2557) (i32.const 0) ) (unreachable) @@ -49566,7 +49567,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2560) + (i32.const 2558) (i32.const 0) ) (unreachable) @@ -49586,7 +49587,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2561) + (i32.const 2559) (i32.const 0) ) (unreachable) @@ -49606,7 +49607,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2562) + (i32.const 2560) (i32.const 0) ) (unreachable) @@ -49626,7 +49627,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2563) + (i32.const 2561) (i32.const 0) ) (unreachable) @@ -49646,7 +49647,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2564) + (i32.const 2562) (i32.const 0) ) (unreachable) @@ -49666,7 +49667,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2565) + (i32.const 2563) (i32.const 0) ) (unreachable) @@ -49684,6 +49685,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2564) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const nan:0x8000000000000) + (f64.const -1) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2565) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const 0) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -49697,11 +49738,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -49718,10 +49759,10 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) + (f64.const inf) (f64.const 0) - (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -49738,10 +49779,12 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) - (f64.const -0) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) (f64.const 0) - (get_global $std/math/INVALID) + (f64.const 0) + (i32.const 0) ) ) (block @@ -49758,8 +49801,8 @@ (i32.eqz (call $std/math/test_rem (f64.const 0) - (f64.const inf) - (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -49777,13 +49820,11 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const -0) (f64.const 0) - (f64.neg - (f64.const inf) - ) + (f64.const nan:0x8000000000000) (f64.const 0) - (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -49799,11 +49840,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 0) - (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const -0) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -49816,46 +49857,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2573) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2574) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -49870,7 +49871,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2575) + (i32.const 2573) (i32.const 0) ) (unreachable) @@ -49892,7 +49893,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2576) + (i32.const 2574) (i32.const 0) ) (unreachable) @@ -49912,7 +49913,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2577) + (i32.const 2575) (i32.const 0) ) (unreachable) @@ -49928,6 +49929,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2576) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const -1) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2577) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -49941,7 +49982,9 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.neg + (f64.const inf) + ) (f64.const 0) (f64.const nan:0x8000000000000) (f64.const 0) @@ -49961,11 +50004,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -49978,48 +50021,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.neg - (f64.const inf) - ) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2581) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const nan:0x8000000000000) - (f64.const 0) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2582) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -50034,7 +50035,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2583) + (i32.const 2581) (i32.const 0) ) (unreachable) @@ -50054,7 +50055,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2584) + (i32.const 2582) (i32.const 0) ) (unreachable) @@ -50072,6 +50073,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2583) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const nan:0x8000000000000) + (f64.const -0) + (f64.const nan:0x8000000000000) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2584) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_rem + (f64.const inf) + (f64.const 2) + (f64.const nan:0x8000000000000) + (f64.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -50085,11 +50126,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const inf) + (f64.const -0.5) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50106,10 +50147,10 @@ (i32.eqz (call $std/math/test_rem (f64.const inf) - (f64.const 2) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50125,8 +50166,10 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const -0.5) + (f64.neg + (f64.const inf) + ) + (f64.const 2) (f64.const nan:0x8000000000000) (f64.const 0) (get_global $std/math/INVALID) @@ -50145,11 +50188,13 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.neg + (f64.const inf) + ) + (f64.const -0.5) (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50168,10 +50213,10 @@ (f64.neg (f64.const inf) ) - (f64.const 2) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50187,13 +50232,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.neg - (f64.const inf) - ) - (f64.const -0.5) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50209,9 +50252,7 @@ (if (i32.eqz (call $std/math/test_rem - (f64.neg - (f64.const inf) - ) + (f64.const 1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) @@ -50231,7 +50272,7 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) (f64.const 0) @@ -50252,8 +50293,8 @@ (i32.eqz (call $std/math/test_rem (f64.const 1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -50272,8 +50313,8 @@ (i32.eqz (call $std/math/test_rem (f64.const -1) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const inf) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -50291,11 +50332,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1) (f64.const inf) - (f64.const 1) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50311,11 +50352,13 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) + (f64.neg + (f64.const inf) + ) (f64.const inf) - (f64.const -1) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50331,11 +50374,13 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const 1) + (f64.neg + (f64.const inf) + ) + (f64.const 1) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50351,13 +50396,13 @@ (if (i32.eqz (call $std/math/test_rem + (f64.const -1) (f64.neg (f64.const inf) ) - (f64.const inf) - (f64.const nan:0x8000000000000) + (f64.const -1) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50373,13 +50418,13 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const 1) + (f64.const inf) (f64.neg (f64.const inf) ) - (f64.const 1) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50395,13 +50440,15 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const -1) (f64.neg (f64.const inf) ) - (f64.const -1) + (f64.neg + (f64.const inf) + ) + (f64.const nan:0x8000000000000) (f64.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -50417,13 +50464,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.const inf) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const 1.75) + (f64.const 0.5) + (f64.const -0.25) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50439,15 +50484,11 @@ (if (i32.eqz (call $std/math/test_rem - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (f64.const -1.75) + (f64.const 0.5) + (f64.const 0.25) (f64.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -50464,7 +50505,7 @@ (i32.eqz (call $std/math/test_rem (f64.const 1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const -0.25) (f64.const 0) (i32.const 0) @@ -50484,7 +50525,7 @@ (i32.eqz (call $std/math/test_rem (f64.const -1.75) - (f64.const 0.5) + (f64.const -0.5) (f64.const 0.25) (f64.const 0) (i32.const 0) @@ -50500,46 +50541,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const 1.75) - (f64.const -0.5) - (f64.const -0.25) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2606) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_rem - (f64.const -1.75) - (f64.const -0.5) - (f64.const 0.25) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2607) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_rem @@ -50554,7 +50555,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2608) + (i32.const 2606) (i32.const 0) ) (unreachable) @@ -50574,7 +50575,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2617) + (i32.const 2615) (i32.const 0) ) (unreachable) @@ -50594,7 +50595,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2618) + (i32.const 2616) (i32.const 0) ) (unreachable) @@ -50614,7 +50615,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2619) + (i32.const 2617) (i32.const 0) ) (unreachable) @@ -50634,7 +50635,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2620) + (i32.const 2618) (i32.const 0) ) (unreachable) @@ -50654,7 +50655,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2621) + (i32.const 2619) (i32.const 0) ) (unreachable) @@ -50674,7 +50675,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2622) + (i32.const 2620) (i32.const 0) ) (unreachable) @@ -50694,7 +50695,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2623) + (i32.const 2621) (i32.const 0) ) (unreachable) @@ -50714,7 +50715,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2624) + (i32.const 2622) (i32.const 0) ) (unreachable) @@ -50734,7 +50735,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2625) + (i32.const 2623) (i32.const 0) ) (unreachable) @@ -50754,7 +50755,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2626) + (i32.const 2624) (i32.const 0) ) (unreachable) @@ -50770,6 +50771,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2627) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -0) + (f32.const 1) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2628) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -50783,9 +50824,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0) + (f32.const -0.5) (f32.const 1) - (f32.const -0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -50803,9 +50844,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0.5) (f32.const 1) - (f32.const 0.5) + (f32.const 1) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -50823,9 +50864,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0.5) + (f32.const -1) (f32.const 1) - (f32.const -0.5) + (f32.const -0) (f32.const 0) (i32.const 0) ) @@ -50843,9 +50884,9 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const 1.5) (f32.const 1) - (f32.const 1) - (f32.const 0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -50863,9 +50904,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.const -1.5) (f32.const 1) - (f32.const -0) + (f32.const 0.5) (f32.const 0) (i32.const 0) ) @@ -50883,9 +50924,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1.5) + (f32.const 2) (f32.const 1) - (f32.const -0.5) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -50900,46 +50941,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -1.5) - (f32.const 1) - (f32.const 0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2636) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 2) - (f32.const 1) - (f32.const 0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2637) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -50954,7 +50955,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2638) + (i32.const 2636) (i32.const 0) ) (unreachable) @@ -50974,7 +50975,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2639) + (i32.const 2637) (i32.const 0) ) (unreachable) @@ -50996,7 +50997,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2640) + (i32.const 2638) (i32.const 0) ) (unreachable) @@ -51012,6 +51013,46 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2639) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0) + (f32.const -1) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2640) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -0) + (f32.const -1) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51025,9 +51066,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0) + (f32.const 0.5) (f32.const -1) - (f32.const 0) + (f32.const 0.5) (f32.const 0) (i32.const 0) ) @@ -51045,9 +51086,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -0) + (f32.const -0.5) (f32.const -1) - (f32.const -0) + (f32.const -0.5) (f32.const 0) (i32.const 0) ) @@ -51062,46 +51103,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2644) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2645) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -51116,7 +51117,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2646) + (i32.const 2644) (i32.const 0) ) (unreachable) @@ -51136,7 +51137,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2647) + (i32.const 2645) (i32.const 0) ) (unreachable) @@ -51156,7 +51157,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2648) + (i32.const 2646) (i32.const 0) ) (unreachable) @@ -51176,7 +51177,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2649) + (i32.const 2647) (i32.const 0) ) (unreachable) @@ -51196,7 +51197,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2650) + (i32.const 2648) (i32.const 0) ) (unreachable) @@ -51216,7 +51217,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2651) + (i32.const 2649) (i32.const 0) ) (unreachable) @@ -51236,7 +51237,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2652) + (i32.const 2650) (i32.const 0) ) (unreachable) @@ -51254,6 +51255,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2651) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const nan:0x400000) + (f32.const -1) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2652) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51267,11 +51308,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const nan:0x400000) - (f32.const -1) + (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51288,10 +51329,10 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) + (f32.const inf) (f32.const 0) - (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51308,10 +51349,12 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) - (f32.const -0) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) (f32.const 0) - (get_global $std/math/INVALID) + (f32.const 0) + (i32.const 0) ) ) (block @@ -51328,8 +51371,8 @@ (i32.eqz (call $std/math/test_remf (f32.const 0) - (f32.const inf) - (f32.const 0) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -51347,13 +51390,11 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const -0) (f32.const 0) - (f32.neg - (f32.const inf) - ) + (f32.const nan:0x400000) (f32.const 0) - (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51369,11 +51410,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 0) - (f32.const nan:0x400000) + (f32.const -0) + (f32.const -0) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51386,46 +51427,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2660) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -0) - (f32.const -0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2661) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -51440,7 +51441,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2662) + (i32.const 2660) (i32.const 0) ) (unreachable) @@ -51462,7 +51463,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2663) + (i32.const 2661) (i32.const 0) ) (unreachable) @@ -51482,7 +51483,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2664) + (i32.const 2662) (i32.const 0) ) (unreachable) @@ -51498,6 +51499,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2663) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const -1) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2664) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51511,7 +51552,9 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.neg + (f32.const inf) + ) (f32.const 0) (f32.const nan:0x400000) (f32.const 0) @@ -51531,11 +51574,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51548,48 +51591,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.neg - (f32.const inf) - ) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (get_global $std/math/INVALID) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2668) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const nan:0x400000) - (f32.const 0) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2669) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -51604,7 +51605,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2670) + (i32.const 2668) (i32.const 0) ) (unreachable) @@ -51624,7 +51625,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2671) + (i32.const 2669) (i32.const 0) ) (unreachable) @@ -51642,6 +51643,46 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2670) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const nan:0x400000) + (f32.const -0) + (f32.const nan:0x400000) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2671) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_remf + (f32.const inf) + (f32.const 2) + (f32.const nan:0x400000) + (f32.const 0) + (get_global $std/math/INVALID) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -51655,11 +51696,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const nan:0x400000) - (f32.const -0) + (f32.const inf) + (f32.const -0.5) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51676,10 +51717,10 @@ (i32.eqz (call $std/math/test_remf (f32.const inf) - (f32.const 2) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51695,8 +51736,10 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const -0.5) + (f32.neg + (f32.const inf) + ) + (f32.const 2) (f32.const nan:0x400000) (f32.const 0) (get_global $std/math/INVALID) @@ -51715,11 +51758,13 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const nan:0x400000) + (f32.neg + (f32.const inf) + ) + (f32.const -0.5) (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51738,10 +51783,10 @@ (f32.neg (f32.const inf) ) - (f32.const 2) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51757,13 +51802,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.neg - (f32.const inf) - ) - (f32.const -0.5) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51779,9 +51822,7 @@ (if (i32.eqz (call $std/math/test_remf - (f32.neg - (f32.const inf) - ) + (f32.const 1) (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) @@ -51801,7 +51842,7 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const nan:0x400000) + (f32.const -1) (f32.const nan:0x400000) (f32.const nan:0x400000) (f32.const 0) @@ -51822,8 +51863,8 @@ (i32.eqz (call $std/math/test_remf (f32.const 1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -51842,8 +51883,8 @@ (i32.eqz (call $std/math/test_remf (f32.const -1) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const inf) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -51861,11 +51902,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1) (f32.const inf) - (f32.const 1) + (f32.const inf) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51881,11 +51922,13 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) + (f32.neg + (f32.const inf) + ) (f32.const inf) - (f32.const -1) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51901,11 +51944,13 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const 1) + (f32.neg + (f32.const inf) + ) + (f32.const 1) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51921,13 +51966,13 @@ (if (i32.eqz (call $std/math/test_remf + (f32.const -1) (f32.neg (f32.const inf) ) - (f32.const inf) - (f32.const nan:0x400000) + (f32.const -1) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -51943,13 +51988,13 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const 1) + (f32.const inf) (f32.neg (f32.const inf) ) - (f32.const 1) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51965,13 +52010,15 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const -1) (f32.neg (f32.const inf) ) - (f32.const -1) + (f32.neg + (f32.const inf) + ) + (f32.const nan:0x400000) (f32.const 0) - (i32.const 0) + (get_global $std/math/INVALID) ) ) (block @@ -51987,13 +52034,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.const inf) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const 1.75) + (f32.const 0.5) + (f32.const -0.25) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -52009,15 +52054,11 @@ (if (i32.eqz (call $std/math/test_remf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) + (f32.const -1.75) + (f32.const 0.5) + (f32.const 0.25) (f32.const 0) - (get_global $std/math/INVALID) + (i32.const 0) ) ) (block @@ -52034,7 +52075,7 @@ (i32.eqz (call $std/math/test_remf (f32.const 1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const -0.25) (f32.const 0) (i32.const 0) @@ -52054,7 +52095,7 @@ (i32.eqz (call $std/math/test_remf (f32.const -1.75) - (f32.const 0.5) + (f32.const -0.5) (f32.const 0.25) (f32.const 0) (i32.const 0) @@ -52070,46 +52111,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const 1.75) - (f32.const -0.5) - (f32.const -0.25) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2693) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_remf - (f32.const -1.75) - (f32.const -0.5) - (f32.const 0.25) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2694) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_remf @@ -52124,7 +52125,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2695) + (i32.const 2693) (i32.const 0) ) (unreachable) @@ -52143,7 +52144,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2760) + (i32.const 2758) (i32.const 0) ) (unreachable) @@ -52162,7 +52163,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2761) + (i32.const 2759) (i32.const 0) ) (unreachable) @@ -52181,7 +52182,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2762) + (i32.const 2760) (i32.const 0) ) (unreachable) @@ -52200,7 +52201,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2763) + (i32.const 2761) (i32.const 0) ) (unreachable) @@ -52219,7 +52220,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2764) + (i32.const 2762) (i32.const 0) ) (unreachable) @@ -52238,7 +52239,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2765) + (i32.const 2763) (i32.const 0) ) (unreachable) @@ -52257,7 +52258,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2766) + (i32.const 2764) (i32.const 0) ) (unreachable) @@ -52276,7 +52277,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2767) + (i32.const 2765) (i32.const 0) ) (unreachable) @@ -52295,7 +52296,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2768) + (i32.const 2766) (i32.const 0) ) (unreachable) @@ -52314,7 +52315,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2769) + (i32.const 2767) (i32.const 0) ) (unreachable) @@ -52329,6 +52330,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2770) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinh + (f64.const -0) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2771) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinh + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -52342,8 +52381,12 @@ (if (i32.eqz (call $std/math/test_sinh - (f64.const -0) - (f64.const -0) + (f64.neg + (f64.const inf) + ) + (f64.neg + (f64.const inf) + ) (f64.const 0) (i32.const 0) ) @@ -52361,8 +52404,8 @@ (if (i32.eqz (call $std/math/test_sinh - (f64.const inf) - (f64.const inf) + (f64.const nan:0x8000000000000) + (f64.const nan:0x8000000000000) (f64.const 0) (i32.const 0) ) @@ -52377,48 +52420,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sinh - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2775) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sinh - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2776) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sinhf @@ -52432,7 +52433,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2785) + (i32.const 2783) (i32.const 0) ) (unreachable) @@ -52451,7 +52452,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2786) + (i32.const 2784) (i32.const 0) ) (unreachable) @@ -52470,7 +52471,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2787) + (i32.const 2785) (i32.const 0) ) (unreachable) @@ -52489,7 +52490,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2788) + (i32.const 2786) (i32.const 0) ) (unreachable) @@ -52508,7 +52509,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2789) + (i32.const 2787) (i32.const 0) ) (unreachable) @@ -52527,7 +52528,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2790) + (i32.const 2788) (i32.const 0) ) (unreachable) @@ -52546,7 +52547,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2791) + (i32.const 2789) (i32.const 0) ) (unreachable) @@ -52565,7 +52566,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2792) + (i32.const 2790) (i32.const 0) ) (unreachable) @@ -52584,7 +52585,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2793) + (i32.const 2791) (i32.const 0) ) (unreachable) @@ -52603,7 +52604,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2794) + (i32.const 2792) (i32.const 0) ) (unreachable) @@ -52618,6 +52619,44 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2795) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinhf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2796) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sinhf + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -52631,8 +52670,12 @@ (if (i32.eqz (call $std/math/test_sinhf - (f32.const -0) - (f32.const -0) + (f32.neg + (f32.const inf) + ) + (f32.neg + (f32.const inf) + ) (f32.const 0) (i32.const 0) ) @@ -52650,8 +52693,8 @@ (if (i32.eqz (call $std/math/test_sinhf - (f32.const inf) - (f32.const inf) + (f32.const nan:0x400000) + (f32.const nan:0x400000) (f32.const 0) (i32.const 0) ) @@ -52666,48 +52709,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sinhf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2800) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sinhf - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2801) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -52721,7 +52722,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2813) + (i32.const 2811) (i32.const 0) ) (unreachable) @@ -52740,7 +52741,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2814) + (i32.const 2812) (i32.const 0) ) (unreachable) @@ -52759,7 +52760,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2815) + (i32.const 2813) (i32.const 0) ) (unreachable) @@ -52778,7 +52779,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2816) + (i32.const 2814) (i32.const 0) ) (unreachable) @@ -52797,7 +52798,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2817) + (i32.const 2815) (i32.const 0) ) (unreachable) @@ -52816,7 +52817,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2818) + (i32.const 2816) (i32.const 0) ) (unreachable) @@ -52835,7 +52836,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2819) + (i32.const 2817) (i32.const 0) ) (unreachable) @@ -52854,7 +52855,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2820) + (i32.const 2818) (i32.const 0) ) (unreachable) @@ -52873,7 +52874,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2821) + (i32.const 2819) (i32.const 0) ) (unreachable) @@ -52892,7 +52893,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2822) + (i32.const 2820) (i32.const 0) ) (unreachable) @@ -52911,7 +52912,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2825) + (i32.const 2823) (i32.const 0) ) (unreachable) @@ -52930,7 +52931,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2826) + (i32.const 2824) (i32.const 0) ) (unreachable) @@ -52947,6 +52948,44 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2825) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 0) + (f64.const 0) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2826) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const -0) + (f64.const -0) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -52960,8 +52999,8 @@ (if (i32.eqz (call $std/math/test_sqrt - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -52976,44 +53015,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const -0) - (f64.const -0) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2829) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 1) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2830) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -53027,7 +53028,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2831) + (i32.const 2829) (i32.const 0) ) (unreachable) @@ -53046,7 +53047,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2832) + (i32.const 2830) (i32.const 0) ) (unreachable) @@ -53065,7 +53066,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2833) + (i32.const 2831) (i32.const 0) ) (unreachable) @@ -53084,7 +53085,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2834) + (i32.const 2832) (i32.const 0) ) (unreachable) @@ -53103,7 +53104,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2835) + (i32.const 2833) (i32.const 0) ) (unreachable) @@ -53122,7 +53123,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2836) + (i32.const 2834) (i32.const 0) ) (unreachable) @@ -53141,7 +53142,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2837) + (i32.const 2835) (i32.const 0) ) (unreachable) @@ -53156,6 +53157,44 @@ (get_global $std/math/INEXACT) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2836) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 1.0000000000000002) + (f64.const 1) + (f64.const -0.5) + (get_global $std/math/INEXACT) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2837) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrt + (f64.const 2.0000000000000004) + (f64.const 1.4142135623730951) + (f64.const -0.27173060178756714) + (get_global $std/math/INEXACT) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -53188,9 +53227,9 @@ (if (i32.eqz (call $std/math/test_sqrt - (f64.const 2.0000000000000004) - (f64.const 1.4142135623730951) - (f64.const -0.27173060178756714) + (f64.const 0.9999999999999999) + (f64.const 0.9999999999999999) + (f64.const -0.5) (get_global $std/math/INEXACT) ) ) @@ -53204,44 +53243,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 1.0000000000000002) - (f64.const 1) - (f64.const -0.5) - (get_global $std/math/INEXACT) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2841) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrt - (f64.const 0.9999999999999999) - (f64.const 0.9999999999999999) - (f64.const -0.5) - (get_global $std/math/INEXACT) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2842) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrt @@ -53255,7 +53256,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2843) + (i32.const 2841) (i32.const 0) ) (unreachable) @@ -53274,7 +53275,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2844) + (i32.const 2842) (i32.const 0) ) (unreachable) @@ -53293,7 +53294,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2845) + (i32.const 2843) (i32.const 0) ) (unreachable) @@ -53312,7 +53313,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2846) + (i32.const 2844) (i32.const 0) ) (unreachable) @@ -53331,7 +53332,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2847) + (i32.const 2845) (i32.const 0) ) (unreachable) @@ -53350,7 +53351,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2848) + (i32.const 2846) (i32.const 0) ) (unreachable) @@ -53369,7 +53370,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2849) + (i32.const 2847) (i32.const 0) ) (unreachable) @@ -53388,7 +53389,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2850) + (i32.const 2848) (i32.const 0) ) (unreachable) @@ -53407,7 +53408,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2851) + (i32.const 2849) (i32.const 0) ) (unreachable) @@ -53426,7 +53427,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2852) + (i32.const 2850) (i32.const 0) ) (unreachable) @@ -53445,7 +53446,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2853) + (i32.const 2851) (i32.const 0) ) (unreachable) @@ -53464,7 +53465,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2854) + (i32.const 2852) (i32.const 0) ) (unreachable) @@ -53483,7 +53484,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2855) + (i32.const 2853) (i32.const 0) ) (unreachable) @@ -53502,7 +53503,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2856) + (i32.const 2854) (i32.const 0) ) (unreachable) @@ -53521,7 +53522,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2857) + (i32.const 2855) (i32.const 0) ) (unreachable) @@ -53540,7 +53541,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2858) + (i32.const 2856) (i32.const 0) ) (unreachable) @@ -53559,7 +53560,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2859) + (i32.const 2857) (i32.const 0) ) (unreachable) @@ -53578,7 +53579,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2860) + (i32.const 2858) (i32.const 0) ) (unreachable) @@ -53597,7 +53598,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2861) + (i32.const 2859) (i32.const 0) ) (unreachable) @@ -53616,7 +53617,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2862) + (i32.const 2860) (i32.const 0) ) (unreachable) @@ -53635,7 +53636,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2863) + (i32.const 2861) (i32.const 0) ) (unreachable) @@ -53654,7 +53655,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2864) + (i32.const 2862) (i32.const 0) ) (unreachable) @@ -53673,7 +53674,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2865) + (i32.const 2863) (i32.const 0) ) (unreachable) @@ -53692,7 +53693,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2866) + (i32.const 2864) (i32.const 0) ) (unreachable) @@ -53711,7 +53712,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2867) + (i32.const 2865) (i32.const 0) ) (unreachable) @@ -53730,7 +53731,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2868) + (i32.const 2866) (i32.const 0) ) (unreachable) @@ -53749,7 +53750,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2869) + (i32.const 2867) (i32.const 0) ) (unreachable) @@ -53768,7 +53769,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2870) + (i32.const 2868) (i32.const 0) ) (unreachable) @@ -53787,7 +53788,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2871) + (i32.const 2869) (i32.const 0) ) (unreachable) @@ -53806,7 +53807,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2872) + (i32.const 2870) (i32.const 0) ) (unreachable) @@ -53825,7 +53826,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2873) + (i32.const 2871) (i32.const 0) ) (unreachable) @@ -53844,7 +53845,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2874) + (i32.const 2872) (i32.const 0) ) (unreachable) @@ -53863,7 +53864,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2875) + (i32.const 2873) (i32.const 0) ) (unreachable) @@ -53882,7 +53883,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2876) + (i32.const 2874) (i32.const 0) ) (unreachable) @@ -53901,7 +53902,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2877) + (i32.const 2875) (i32.const 0) ) (unreachable) @@ -53920,7 +53921,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2878) + (i32.const 2876) (i32.const 0) ) (unreachable) @@ -53939,7 +53940,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2879) + (i32.const 2877) (i32.const 0) ) (unreachable) @@ -53958,7 +53959,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2880) + (i32.const 2878) (i32.const 0) ) (unreachable) @@ -53977,7 +53978,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2881) + (i32.const 2879) (i32.const 0) ) (unreachable) @@ -53996,7 +53997,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2882) + (i32.const 2880) (i32.const 0) ) (unreachable) @@ -54015,7 +54016,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2883) + (i32.const 2881) (i32.const 0) ) (unreachable) @@ -54034,7 +54035,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2884) + (i32.const 2882) (i32.const 0) ) (unreachable) @@ -54053,7 +54054,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2885) + (i32.const 2883) (i32.const 0) ) (unreachable) @@ -54072,7 +54073,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2886) + (i32.const 2884) (i32.const 0) ) (unreachable) @@ -54091,7 +54092,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2887) + (i32.const 2885) (i32.const 0) ) (unreachable) @@ -54110,7 +54111,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2888) + (i32.const 2886) (i32.const 0) ) (unreachable) @@ -54129,7 +54130,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2889) + (i32.const 2887) (i32.const 0) ) (unreachable) @@ -54148,7 +54149,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2890) + (i32.const 2888) (i32.const 0) ) (unreachable) @@ -54167,7 +54168,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2891) + (i32.const 2889) (i32.const 0) ) (unreachable) @@ -54186,7 +54187,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2892) + (i32.const 2890) (i32.const 0) ) (unreachable) @@ -54205,7 +54206,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2893) + (i32.const 2891) (i32.const 0) ) (unreachable) @@ -54224,7 +54225,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2894) + (i32.const 2892) (i32.const 0) ) (unreachable) @@ -54243,7 +54244,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2895) + (i32.const 2893) (i32.const 0) ) (unreachable) @@ -54262,7 +54263,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2896) + (i32.const 2894) (i32.const 0) ) (unreachable) @@ -54281,7 +54282,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2897) + (i32.const 2895) (i32.const 0) ) (unreachable) @@ -54300,7 +54301,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2898) + (i32.const 2896) (i32.const 0) ) (unreachable) @@ -54319,7 +54320,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2907) + (i32.const 2905) (i32.const 0) ) (unreachable) @@ -54338,7 +54339,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2908) + (i32.const 2906) (i32.const 0) ) (unreachable) @@ -54357,7 +54358,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2909) + (i32.const 2907) (i32.const 0) ) (unreachable) @@ -54376,7 +54377,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2910) + (i32.const 2908) (i32.const 0) ) (unreachable) @@ -54395,7 +54396,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2911) + (i32.const 2909) (i32.const 0) ) (unreachable) @@ -54414,7 +54415,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2912) + (i32.const 2910) (i32.const 0) ) (unreachable) @@ -54433,7 +54434,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2913) + (i32.const 2911) (i32.const 0) ) (unreachable) @@ -54452,7 +54453,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2914) + (i32.const 2912) (i32.const 0) ) (unreachable) @@ -54471,7 +54472,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2915) + (i32.const 2913) (i32.const 0) ) (unreachable) @@ -54490,7 +54491,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2916) + (i32.const 2914) (i32.const 0) ) (unreachable) @@ -54509,7 +54510,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2919) + (i32.const 2917) (i32.const 0) ) (unreachable) @@ -54528,7 +54529,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2920) + (i32.const 2918) (i32.const 0) ) (unreachable) @@ -54545,6 +54546,44 @@ (get_global $std/math/INVALID) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2919) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrtf + (f32.const 0) + (f32.const 0) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 2920) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_sqrtf + (f32.const -0) + (f32.const -0) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -54558,8 +54597,8 @@ (if (i32.eqz (call $std/math/test_sqrtf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -54574,44 +54613,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_sqrtf - (f32.const -0) - (f32.const -0) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2923) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_sqrtf - (f32.const 1) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 2924) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_sqrtf @@ -54625,7 +54626,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2925) + (i32.const 2923) (i32.const 0) ) (unreachable) @@ -54644,7 +54645,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2926) + (i32.const 2924) (i32.const 0) ) (unreachable) @@ -54663,7 +54664,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2927) + (i32.const 2925) (i32.const 0) ) (unreachable) @@ -54682,7 +54683,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2928) + (i32.const 2926) (i32.const 0) ) (unreachable) @@ -54701,7 +54702,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2929) + (i32.const 2927) (i32.const 0) ) (unreachable) @@ -54720,7 +54721,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2930) + (i32.const 2928) (i32.const 0) ) (unreachable) @@ -54739,7 +54740,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2931) + (i32.const 2929) (i32.const 0) ) (unreachable) @@ -54758,7 +54759,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2932) + (i32.const 2930) (i32.const 0) ) (unreachable) @@ -54777,7 +54778,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2933) + (i32.const 2931) (i32.const 0) ) (unreachable) @@ -54796,7 +54797,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2934) + (i32.const 2932) (i32.const 0) ) (unreachable) @@ -54815,7 +54816,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2935) + (i32.const 2933) (i32.const 0) ) (unreachable) @@ -54834,7 +54835,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2936) + (i32.const 2934) (i32.const 0) ) (unreachable) @@ -54853,7 +54854,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2937) + (i32.const 2935) (i32.const 0) ) (unreachable) @@ -54872,7 +54873,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2938) + (i32.const 2936) (i32.const 0) ) (unreachable) @@ -54891,7 +54892,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2939) + (i32.const 2937) (i32.const 0) ) (unreachable) @@ -54910,7 +54911,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 2940) + (i32.const 2938) (i32.const 0) ) (unreachable) @@ -54929,7 +54930,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3005) + (i32.const 3003) (i32.const 0) ) (unreachable) @@ -54948,7 +54949,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3006) + (i32.const 3004) (i32.const 0) ) (unreachable) @@ -54967,7 +54968,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3007) + (i32.const 3005) (i32.const 0) ) (unreachable) @@ -54986,7 +54987,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3008) + (i32.const 3006) (i32.const 0) ) (unreachable) @@ -55005,7 +55006,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3009) + (i32.const 3007) (i32.const 0) ) (unreachable) @@ -55024,7 +55025,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3010) + (i32.const 3008) (i32.const 0) ) (unreachable) @@ -55043,7 +55044,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3011) + (i32.const 3009) (i32.const 0) ) (unreachable) @@ -55062,7 +55063,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3012) + (i32.const 3010) (i32.const 0) ) (unreachable) @@ -55081,7 +55082,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3013) + (i32.const 3011) (i32.const 0) ) (unreachable) @@ -55100,7 +55101,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3014) + (i32.const 3012) (i32.const 0) ) (unreachable) @@ -55119,7 +55120,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3017) + (i32.const 3015) (i32.const 0) ) (unreachable) @@ -55138,7 +55139,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3018) + (i32.const 3016) (i32.const 0) ) (unreachable) @@ -55157,7 +55158,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3019) + (i32.const 3017) (i32.const 0) ) (unreachable) @@ -55178,7 +55179,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3020) + (i32.const 3018) (i32.const 0) ) (unreachable) @@ -55197,7 +55198,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3021) + (i32.const 3019) (i32.const 0) ) (unreachable) @@ -55216,7 +55217,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3030) + (i32.const 3028) (i32.const 0) ) (unreachable) @@ -55235,7 +55236,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3031) + (i32.const 3029) (i32.const 0) ) (unreachable) @@ -55254,7 +55255,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3032) + (i32.const 3030) (i32.const 0) ) (unreachable) @@ -55273,7 +55274,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3033) + (i32.const 3031) (i32.const 0) ) (unreachable) @@ -55292,7 +55293,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3034) + (i32.const 3032) (i32.const 0) ) (unreachable) @@ -55311,7 +55312,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3035) + (i32.const 3033) (i32.const 0) ) (unreachable) @@ -55330,7 +55331,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3036) + (i32.const 3034) (i32.const 0) ) (unreachable) @@ -55349,7 +55350,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3037) + (i32.const 3035) (i32.const 0) ) (unreachable) @@ -55368,7 +55369,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3038) + (i32.const 3036) (i32.const 0) ) (unreachable) @@ -55387,7 +55388,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3039) + (i32.const 3037) (i32.const 0) ) (unreachable) @@ -55406,7 +55407,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3042) + (i32.const 3040) (i32.const 0) ) (unreachable) @@ -55425,7 +55426,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3043) + (i32.const 3041) (i32.const 0) ) (unreachable) @@ -55444,7 +55445,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3044) + (i32.const 3042) (i32.const 0) ) (unreachable) @@ -55465,7 +55466,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3045) + (i32.const 3043) (i32.const 0) ) (unreachable) @@ -55484,7 +55485,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3046) + (i32.const 3044) (i32.const 0) ) (unreachable) @@ -55503,7 +55504,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3058) + (i32.const 3056) (i32.const 0) ) (unreachable) @@ -55522,7 +55523,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3059) + (i32.const 3057) (i32.const 0) ) (unreachable) @@ -55541,7 +55542,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3060) + (i32.const 3058) (i32.const 0) ) (unreachable) @@ -55560,7 +55561,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3061) + (i32.const 3059) (i32.const 0) ) (unreachable) @@ -55579,7 +55580,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3062) + (i32.const 3060) (i32.const 0) ) (unreachable) @@ -55598,7 +55599,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3063) + (i32.const 3061) (i32.const 0) ) (unreachable) @@ -55617,7 +55618,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3064) + (i32.const 3062) (i32.const 0) ) (unreachable) @@ -55636,7 +55637,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3065) + (i32.const 3063) (i32.const 0) ) (unreachable) @@ -55655,7 +55656,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3066) + (i32.const 3064) (i32.const 0) ) (unreachable) @@ -55674,7 +55675,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3067) + (i32.const 3065) (i32.const 0) ) (unreachable) @@ -55689,6 +55690,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3068) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_trunc + (f64.const inf) + (f64.const inf) + (f64.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3069) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_trunc + (f64.neg + (f64.const inf) + ) + (f64.neg + (f64.const inf) + ) + (f64.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -55702,8 +55745,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const inf) - (f64.const inf) + (f64.const 0) + (f64.const 0) (f64.const 0) (i32.const 0) ) @@ -55721,12 +55764,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) + (f64.const -0) + (f64.const -0) (f64.const 0) (i32.const 0) ) @@ -55744,8 +55783,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const 0) - (f64.const 0) + (f64.const 1) + (f64.const 1) (f64.const 0) (i32.const 0) ) @@ -55763,8 +55802,8 @@ (if (i32.eqz (call $std/math/test_trunc - (f64.const -0) - (f64.const -0) + (f64.const -1) + (f64.const -1) (f64.const 0) (i32.const 0) ) @@ -55779,44 +55818,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_trunc - (f64.const 1) - (f64.const 1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3075) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_trunc - (f64.const -1) - (f64.const -1) - (f64.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3076) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_trunc @@ -55830,7 +55831,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3077) + (i32.const 3075) (i32.const 0) ) (unreachable) @@ -55849,7 +55850,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3078) + (i32.const 3076) (i32.const 0) ) (unreachable) @@ -55868,7 +55869,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3079) + (i32.const 3077) (i32.const 0) ) (unreachable) @@ -55887,7 +55888,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3080) + (i32.const 3078) (i32.const 0) ) (unreachable) @@ -55906,7 +55907,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3081) + (i32.const 3079) (i32.const 0) ) (unreachable) @@ -55925,7 +55926,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3082) + (i32.const 3080) (i32.const 0) ) (unreachable) @@ -55944,7 +55945,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3083) + (i32.const 3081) (i32.const 0) ) (unreachable) @@ -55963,7 +55964,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3084) + (i32.const 3082) (i32.const 0) ) (unreachable) @@ -55982,7 +55983,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3093) + (i32.const 3091) (i32.const 0) ) (unreachable) @@ -56001,7 +56002,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3094) + (i32.const 3092) (i32.const 0) ) (unreachable) @@ -56020,7 +56021,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3095) + (i32.const 3093) (i32.const 0) ) (unreachable) @@ -56039,7 +56040,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3096) + (i32.const 3094) (i32.const 0) ) (unreachable) @@ -56058,7 +56059,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3097) + (i32.const 3095) (i32.const 0) ) (unreachable) @@ -56077,7 +56078,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3098) + (i32.const 3096) (i32.const 0) ) (unreachable) @@ -56096,7 +56097,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3099) + (i32.const 3097) (i32.const 0) ) (unreachable) @@ -56115,7 +56116,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3100) + (i32.const 3098) (i32.const 0) ) (unreachable) @@ -56134,7 +56135,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3101) + (i32.const 3099) (i32.const 0) ) (unreachable) @@ -56153,7 +56154,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3102) + (i32.const 3100) (i32.const 0) ) (unreachable) @@ -56168,6 +56169,48 @@ (i32.const 0) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3103) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_truncf + (f32.const inf) + (f32.const inf) + (f32.const 0) + (i32.const 0) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3104) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/math/test_truncf + (f32.neg + (f32.const inf) + ) + (f32.neg + (f32.const inf) + ) + (f32.const 0) + (i32.const 0) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -56181,8 +56224,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const inf) - (f32.const inf) + (f32.const 0) + (f32.const 0) (f32.const 0) (i32.const 0) ) @@ -56200,12 +56243,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) + (f32.const -0) + (f32.const -0) (f32.const 0) (i32.const 0) ) @@ -56223,8 +56262,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const 0) - (f32.const 0) + (f32.const 1) + (f32.const 1) (f32.const 0) (i32.const 0) ) @@ -56242,8 +56281,8 @@ (if (i32.eqz (call $std/math/test_truncf - (f32.const -0) - (f32.const -0) + (f32.const -1) + (f32.const -1) (f32.const 0) (i32.const 0) ) @@ -56258,44 +56297,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/math/test_truncf - (f32.const 1) - (f32.const 1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3110) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (call $std/math/test_truncf - (f32.const -1) - (f32.const -1) - (f32.const 0) - (i32.const 0) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3111) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/math/test_truncf @@ -56309,7 +56310,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3112) + (i32.const 3110) (i32.const 0) ) (unreachable) @@ -56328,7 +56329,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3113) + (i32.const 3111) (i32.const 0) ) (unreachable) @@ -56347,7 +56348,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3114) + (i32.const 3112) (i32.const 0) ) (unreachable) @@ -56366,7 +56367,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3115) + (i32.const 3113) (i32.const 0) ) (unreachable) @@ -56385,7 +56386,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3116) + (i32.const 3114) (i32.const 0) ) (unreachable) @@ -56404,7 +56405,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3117) + (i32.const 3115) (i32.const 0) ) (unreachable) @@ -56423,7 +56424,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3118) + (i32.const 3116) (i32.const 0) ) (unreachable) @@ -56442,7 +56443,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3119) + (i32.const 3117) (i32.const 0) ) (unreachable) @@ -56462,7 +56463,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3123) + (i32.const 3121) (i32.const 0) ) (unreachable) @@ -56482,7 +56483,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3124) + (i32.const 3122) (i32.const 0) ) (unreachable) @@ -56502,7 +56503,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3125) + (i32.const 3123) (i32.const 0) ) (unreachable) @@ -56522,7 +56523,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3126) + (i32.const 3124) (i32.const 0) ) (unreachable) @@ -56538,6 +56539,46 @@ (i64.const 1) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3126) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (i64.eq + (call $~lib/math/ipow64 + (i64.const 1) + (i32.const 1) + ) + (i64.const 1) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3127) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (i64.eq + (call $~lib/math/ipow64 + (i64.const 1) + (i32.const 2) + ) + (i64.const 1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -56553,7 +56594,7 @@ (i64.eq (call $~lib/math/ipow64 (i64.const 1) - (i32.const 1) + (i32.const 3) ) (i64.const 1) ) @@ -56572,28 +56613,8 @@ (i32.eqz (i64.eq (call $~lib/math/ipow64 - (i64.const 1) - (i32.const 2) - ) - (i64.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3130) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (i64.eq - (call $~lib/math/ipow64 - (i64.const 1) - (i32.const 3) + (i64.const 2) + (i32.const 0) ) (i64.const 1) ) @@ -56608,26 +56629,6 @@ (unreachable) ) ) - (if - (i32.eqz - (i64.eq - (call $~lib/math/ipow64 - (i64.const 2) - (i32.const 0) - ) - (i64.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3133) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (i64.eq @@ -56642,7 +56643,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3134) + (i32.const 3132) (i32.const 0) ) (unreachable) @@ -56662,7 +56663,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3135) + (i32.const 3133) (i32.const 0) ) (unreachable) @@ -56682,7 +56683,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3136) + (i32.const 3134) (i32.const 0) ) (unreachable) @@ -56698,6 +56699,46 @@ (i64.const 1) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3136) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (i64.eq + (call $~lib/math/ipow64 + (i64.const -1) + (i32.const 1) + ) + (i64.const -1) + ) + ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 3137) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (i64.eq + (call $~lib/math/ipow64 + (i64.const -1) + (i32.const 2) + ) + (i64.const 1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -56708,46 +56749,6 @@ (unreachable) ) ) - (if - (i32.eqz - (i64.eq - (call $~lib/math/ipow64 - (i64.const -1) - (i32.const 1) - ) - (i64.const -1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3139) - (i32.const 0) - ) - (unreachable) - ) - ) - (if - (i32.eqz - (i64.eq - (call $~lib/math/ipow64 - (i64.const -1) - (i32.const 2) - ) - (i64.const 1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 3140) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (i64.eq @@ -56762,7 +56763,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3141) + (i32.const 3139) (i32.const 0) ) (unreachable) @@ -56782,7 +56783,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3143) + (i32.const 3141) (i32.const 0) ) (unreachable) @@ -56802,7 +56803,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3144) + (i32.const 3142) (i32.const 0) ) (unreachable) @@ -56822,7 +56823,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3145) + (i32.const 3143) (i32.const 0) ) (unreachable) @@ -56842,7 +56843,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3146) + (i32.const 3144) (i32.const 0) ) (unreachable) @@ -56862,7 +56863,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3148) + (i32.const 3146) (i32.const 0) ) (unreachable) @@ -56882,7 +56883,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3149) + (i32.const 3147) (i32.const 0) ) (unreachable) @@ -56902,7 +56903,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3150) + (i32.const 3148) (i32.const 0) ) (unreachable) @@ -56922,7 +56923,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3151) + (i32.const 3149) (i32.const 0) ) (unreachable) @@ -56942,7 +56943,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3152) + (i32.const 3150) (i32.const 0) ) (unreachable) @@ -56962,7 +56963,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3153) + (i32.const 3151) (i32.const 0) ) (unreachable) @@ -56982,7 +56983,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3154) + (i32.const 3152) (i32.const 0) ) (unreachable) @@ -57008,7 +57009,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 3156) + (i32.const 3154) (i32.const 0) ) (unreachable) diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 3f6852c2..d4d65701 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -1,6 +1,6 @@ (module - (type $FFFi (func (param f64 f64 f64) (result i32))) (type $FFF (func (param f64 f64) (result f64))) + (type $FFFi (func (param f64 f64 f64) (result i32))) (type $FFi (func (param f64 f64) (result i32))) (type $Fi (func (param f64) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -9,11 +9,15 @@ (type $ffi (func (param f32 f32) (result i32))) (type $fi (func (param f32) (result i32))) (type $v (func)) - (import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) + (export "mod" (func $std/mod/mod)) (start $start) (func $~lib/math/NativeMath.mod (; 2 ;) (; has Stack IR ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) @@ -445,7 +449,7 @@ (set_local $3 (call $std/mod/check (tee_local $0 - (call $std/mod/JSOp.mod + (call $std/mod/mod (get_local $0) (get_local $1) ) @@ -866,7 +870,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 21) + (i32.const 20) (i32.const 0) ) (unreachable) @@ -880,6 +884,24 @@ (f64.const 1) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 21) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmod + (f64.const -3) + (f64.const 2) + (f64.const -1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -894,7 +916,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3) - (f64.const 2) + (f64.const -2) (f64.const -1) ) ) @@ -911,9 +933,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3) - (f64.const -2) - (f64.const -1) + (f64.const 3.5) + (f64.const 2) + (f64.const 1.5) ) ) (block @@ -930,7 +952,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 3.5) - (f64.const 2) + (f64.const -2) (f64.const 1.5) ) ) @@ -947,9 +969,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 3.5) - (f64.const -2) - (f64.const 1.5) + (f64.const -3.5) + (f64.const 2) + (f64.const -1.5) ) ) (block @@ -966,7 +988,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3.5) - (f64.const 2) + (f64.const -2) (f64.const -1.5) ) ) @@ -983,9 +1005,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3.5) - (f64.const -2) - (f64.const -1.5) + (f64.const 3) + (f64.const 2.5) + (f64.const 0.5) ) ) (block @@ -1002,7 +1024,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 3) - (f64.const 2.5) + (f64.const -2.5) (f64.const 0.5) ) ) @@ -1019,9 +1041,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 3) - (f64.const -2.5) - (f64.const 0.5) + (f64.const -3) + (f64.const 2.5) + (f64.const -0.5) ) ) (block @@ -1038,7 +1060,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3) - (f64.const 2.5) + (f64.const -2.5) (f64.const -0.5) ) ) @@ -1055,9 +1077,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3) - (f64.const -2.5) - (f64.const -0.5) + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) ) ) (block @@ -1074,7 +1096,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 0.5) - (f64.const 1) + (f64.const -1) (f64.const 0.5) ) ) @@ -1091,9 +1113,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) + (f64.const -0.5) + (f64.const 1) + (f64.const -0.5) ) ) (block @@ -1110,7 +1132,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -0.5) - (f64.const 1) + (f64.const -1) (f64.const -0.5) ) ) @@ -1127,9 +1149,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) + (f64.const 1.5) + (f64.const 1) + (f64.const 0.5) ) ) (block @@ -1146,7 +1168,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1.5) - (f64.const 1) + (f64.const -1) (f64.const 0.5) ) ) @@ -1163,9 +1185,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1.5) - (f64.const -1) - (f64.const 0.5) + (f64.const -1.5) + (f64.const 1) + (f64.const -0.5) ) ) (block @@ -1182,7 +1204,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -1.5) - (f64.const 1) + (f64.const -1) (f64.const -0.5) ) ) @@ -1199,9 +1221,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1.5) - (f64.const -1) - (f64.const -0.5) + (f64.const 1.25) + (f64.const 1) + (f64.const 0.25) ) ) (block @@ -1218,7 +1240,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1.25) - (f64.const 1) + (f64.const -1) (f64.const 0.25) ) ) @@ -1235,9 +1257,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1.25) - (f64.const -1) - (f64.const 0.25) + (f64.const -1.25) + (f64.const 1) + (f64.const -0.25) ) ) (block @@ -1254,7 +1276,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -1.25) - (f64.const 1) + (f64.const -1) (f64.const -0.25) ) ) @@ -1271,9 +1293,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1.25) - (f64.const -1) - (f64.const -0.25) + (f64.const 1) + (f64.const 1.25) + (f64.const 1) ) ) (block @@ -1290,7 +1312,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1) - (f64.const 1.25) + (f64.const -1.25) (f64.const 1) ) ) @@ -1307,9 +1329,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) - (f64.const -1.25) - (f64.const 1) + (f64.const -1) + (f64.const 1.25) + (f64.const -1) ) ) (block @@ -1322,24 +1344,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmod - (f64.const -1) - (f64.const 1.25) - (f64.const -1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 47) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/mod/test_fmod @@ -1352,7 +1356,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 48) + (i32.const 47) (i32.const 0) ) (unreachable) @@ -1370,7 +1374,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 49) + (i32.const 48) (i32.const 0) ) (unreachable) @@ -1384,6 +1388,24 @@ (f64.const nan:0x8000000000000) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 51) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmod + (f64.const -0) + (f64.const 0) + (f64.const nan:0x8000000000000) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -1397,8 +1419,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1415,7 +1437,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const -0) (f64.const nan:0x8000000000000) ) @@ -1433,9 +1455,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) + (f64.const 0) + (f64.const 1) + (f64.const 0) ) ) (block @@ -1451,9 +1473,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const 1) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1469,9 +1491,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const 1) - (f64.const -0) + (f64.const 0) + (f64.const -1) + (f64.const 0) ) ) (block @@ -1487,9 +1509,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const -1) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1505,9 +1527,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const -1) - (f64.const -0) + (f64.const 1) + (f64.const 0) + (f64.const nan:0x8000000000000) ) ) (block @@ -1523,7 +1545,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const 0) (f64.const nan:0x8000000000000) ) @@ -1541,8 +1563,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const 0) + (f64.const 1) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1559,7 +1581,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const -0) (f64.const nan:0x8000000000000) ) @@ -1577,8 +1599,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const -0) + (f64.const nan:0x8000000000000) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -1596,7 +1618,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1614,7 +1636,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -1632,7 +1654,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -1650,7 +1672,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -1668,7 +1690,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1686,7 +1708,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -1704,7 +1726,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -1722,7 +1744,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) ) @@ -1739,9 +1761,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const 0) + (f64.const inf) + (f64.const 0) ) ) (block @@ -1757,9 +1779,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const inf) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1775,9 +1797,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const inf) - (f64.const -0) + (f64.const 0) + (f64.const -inf) + (f64.const 0) ) ) (block @@ -1793,9 +1815,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const -inf) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1811,9 +1833,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const -inf) - (f64.const -0) + (f64.const 1) + (f64.const inf) + (f64.const 1) ) ) (block @@ -1829,9 +1851,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const inf) - (f64.const 1) + (f64.const -1) ) ) (block @@ -1847,9 +1869,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const inf) - (f64.const -1) + (f64.const 1) + (f64.const -inf) + (f64.const 1) ) ) (block @@ -1865,9 +1887,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const -inf) - (f64.const 1) + (f64.const -1) ) ) (block @@ -1883,9 +1905,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const -inf) - (f64.const -1) + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) ) ) (block @@ -1902,7 +1924,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const inf) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1919,8 +1941,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) - (f64.const -0) + (f64.const -inf) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -1938,7 +1960,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -inf) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1955,8 +1977,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -inf) - (f64.const -0) + (f64.const inf) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -1974,7 +1996,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const inf) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -1991,8 +2013,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) - (f64.const -1) + (f64.const -inf) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -2010,7 +2032,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -inf) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -2027,8 +2049,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -inf) - (f64.const -1) + (f64.const inf) + (f64.const inf) (f64.const nan:0x8000000000000) ) ) @@ -2045,7 +2067,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.const -inf) (f64.const inf) (f64.const nan:0x8000000000000) ) @@ -2063,8 +2085,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -inf) (f64.const inf) + (f64.const -inf) (f64.const nan:0x8000000000000) ) ) @@ -2081,7 +2103,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.const -inf) (f64.const -inf) (f64.const nan:0x8000000000000) ) @@ -2099,8 +2121,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -inf) - (f64.const -inf) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) ) @@ -2117,7 +2139,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.const -inf) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) @@ -2135,8 +2157,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -inf) (f64.const nan:0x8000000000000) + (f64.const inf) (f64.const nan:0x8000000000000) ) ) @@ -2154,7 +2176,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const inf) + (f64.const -inf) (f64.const nan:0x8000000000000) ) ) @@ -2170,17 +2192,17 @@ ) (if (i32.eqz - (call $std/mod/test_fmod - (f64.const nan:0x8000000000000) - (f64.const -inf) - (f64.const nan:0x8000000000000) + (call $std/mod/test_fmodf + (f32.const 3) + (f32.const 2) + (f32.const 1) ) ) (block (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 96) + (i32.const 104) (i32.const 0) ) (unreachable) @@ -2190,7 +2212,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3) - (f32.const 2) + (f32.const -2) (f32.const 1) ) ) @@ -2207,9 +2229,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3) - (f32.const -2) - (f32.const 1) + (f32.const -3) + (f32.const 2) + (f32.const -1) ) ) (block @@ -2226,7 +2248,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3) - (f32.const 2) + (f32.const -2) (f32.const -1) ) ) @@ -2243,9 +2265,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3) - (f32.const -2) - (f32.const -1) + (f32.const 3.5) + (f32.const 2) + (f32.const 1.5) ) ) (block @@ -2262,7 +2284,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3.5) - (f32.const 2) + (f32.const -2) (f32.const 1.5) ) ) @@ -2279,9 +2301,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3.5) - (f32.const -2) - (f32.const 1.5) + (f32.const -3.5) + (f32.const 2) + (f32.const -1.5) ) ) (block @@ -2298,7 +2320,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3.5) - (f32.const 2) + (f32.const -2) (f32.const -1.5) ) ) @@ -2315,9 +2337,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3.5) - (f32.const -2) - (f32.const -1.5) + (f32.const 3) + (f32.const 2.5) + (f32.const 0.5) ) ) (block @@ -2334,7 +2356,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3) - (f32.const 2.5) + (f32.const -2.5) (f32.const 0.5) ) ) @@ -2351,9 +2373,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3) - (f32.const -2.5) - (f32.const 0.5) + (f32.const -3) + (f32.const 2.5) + (f32.const -0.5) ) ) (block @@ -2370,7 +2392,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3) - (f32.const 2.5) + (f32.const -2.5) (f32.const -0.5) ) ) @@ -2387,9 +2409,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3) - (f32.const -2.5) - (f32.const -0.5) + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) ) ) (block @@ -2406,7 +2428,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 0.5) - (f32.const 1) + (f32.const -1) (f32.const 0.5) ) ) @@ -2423,9 +2445,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) + (f32.const -0.5) + (f32.const 1) + (f32.const -0.5) ) ) (block @@ -2442,7 +2464,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -0.5) - (f32.const 1) + (f32.const -1) (f32.const -0.5) ) ) @@ -2459,9 +2481,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) + (f32.const 1.5) + (f32.const 1) + (f32.const 0.5) ) ) (block @@ -2478,7 +2500,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 1.5) - (f32.const 1) + (f32.const -1) (f32.const 0.5) ) ) @@ -2495,9 +2517,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1.5) - (f32.const -1) - (f32.const 0.5) + (f32.const -1.5) + (f32.const 1) + (f32.const -0.5) ) ) (block @@ -2514,7 +2536,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -1.5) - (f32.const 1) + (f32.const -1) (f32.const -0.5) ) ) @@ -2531,16 +2553,16 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1.5) - (f32.const -1) - (f32.const -0.5) + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) ) ) (block (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 124) + (i32.const 126) (i32.const 0) ) (unreachable) @@ -2549,7 +2571,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const 0) (f32.const nan:0x400000) ) @@ -2567,8 +2589,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2585,7 +2607,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const -0) (f32.const nan:0x400000) ) @@ -2603,8 +2625,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.const -0) + (f32.const 1) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2621,7 +2643,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const 0) (f32.const nan:0x400000) ) @@ -2639,8 +2661,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const 0) + (f32.const 1) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2657,7 +2679,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const -0) (f32.const nan:0x400000) ) @@ -2675,8 +2697,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const -0) + (f32.const nan:0x400000) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2694,7 +2716,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2712,7 +2734,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -0) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -2730,7 +2752,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -2748,7 +2770,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -1) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2766,7 +2788,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2784,7 +2806,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -0) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -2802,7 +2824,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -2820,7 +2842,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -1) + (f32.const nan:0x400000) (f32.const nan:0x400000) ) ) @@ -2837,9 +2859,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const 0) + (f32.const inf) + (f32.const 0) ) ) (block @@ -2855,9 +2877,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const inf) - (f32.const 0) + (f32.const -0) ) ) (block @@ -2873,9 +2895,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.const inf) - (f32.const -0) + (f32.const 0) + (f32.const -inf) + (f32.const 0) ) ) (block @@ -2891,9 +2913,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const -inf) - (f32.const 0) + (f32.const -0) ) ) (block @@ -2909,9 +2931,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.const -inf) - (f32.const -0) + (f32.const 1) + (f32.const inf) + (f32.const 1) ) ) (block @@ -2927,9 +2949,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const inf) - (f32.const 1) + (f32.const -1) ) ) (block @@ -2945,9 +2967,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const inf) - (f32.const -1) + (f32.const 1) + (f32.const -inf) + (f32.const 1) ) ) (block @@ -2963,9 +2985,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const -inf) - (f32.const 1) + (f32.const -1) ) ) (block @@ -2981,9 +3003,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const -inf) - (f32.const -1) + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) ) ) (block @@ -3000,7 +3022,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const inf) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -3017,8 +3039,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) - (f32.const -0) + (f32.const -inf) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -3036,7 +3058,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -inf) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -3053,8 +3075,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -inf) - (f32.const -0) + (f32.const inf) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -3072,7 +3094,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const inf) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -3089,8 +3111,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) - (f32.const -1) + (f32.const -inf) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -3108,7 +3130,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -inf) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -3125,8 +3147,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -inf) - (f32.const -1) + (f32.const inf) + (f32.const inf) (f32.const nan:0x400000) ) ) @@ -3143,7 +3165,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.const -inf) (f32.const inf) (f32.const nan:0x400000) ) @@ -3161,8 +3183,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -inf) (f32.const inf) + (f32.const -inf) (f32.const nan:0x400000) ) ) @@ -3179,7 +3201,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.const -inf) (f32.const -inf) (f32.const nan:0x400000) ) @@ -3197,8 +3219,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -inf) - (f32.const -inf) + (f32.const inf) + (f32.const nan:0x400000) (f32.const nan:0x400000) ) ) @@ -3215,7 +3237,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.const -inf) (f32.const nan:0x400000) (f32.const nan:0x400000) ) @@ -3233,8 +3255,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -inf) (f32.const nan:0x400000) + (f32.const inf) (f32.const nan:0x400000) ) ) @@ -3252,7 +3274,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const inf) + (f32.const -inf) (f32.const nan:0x400000) ) ) @@ -3266,24 +3288,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmodf - (f32.const nan:0x400000) - (f32.const -inf) - (f32.const nan:0x400000) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 167) - (i32.const 0) - ) - (unreachable) - ) - ) ) (func $null (; 11 ;) (; has Stack IR ;) (type $v) (nop) diff --git a/tests/compiler/std/mod.ts b/tests/compiler/std/mod.ts index 9328f616..17e267c9 100644 --- a/tests/compiler/std/mod.ts +++ b/tests/compiler/std/mod.ts @@ -1,8 +1,7 @@ const js = true; -declare namespace JSOp { - export function mod(x: f64, y: f64): f64; -} +@external("math", "mod") +export declare function mod(x: f64, y: f64): f64; function check(actual: T, expected: T): bool { if (isNaN(expected)) return isNaN(actual); @@ -14,7 +13,7 @@ function check(actual: T, expected: T): bool { function test_fmod(left: f64, right: f64, expected: f64): bool { return check( left % right , expected) && - (!js || check(JSOp.mod(left , right), expected)); + (!js || check(mod(left , right), expected)); } // sanity diff --git a/tests/compiler/std/mod.untouched.wat b/tests/compiler/std/mod.untouched.wat index 8eb35312..a592ef1f 100644 --- a/tests/compiler/std/mod.untouched.wat +++ b/tests/compiler/std/mod.untouched.wat @@ -1,6 +1,6 @@ (module - (type $FFFi (func (param f64 f64 f64) (result i32))) (type $FFF (func (param f64 f64) (result f64))) + (type $FFFi (func (param f64 f64 f64) (result i32))) (type $FFi (func (param f64 f64) (result i32))) (type $Fi (func (param f64) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) @@ -9,17 +9,19 @@ (type $ffi (func (param f32 f32) (result i32))) (type $fi (func (param f32) (result i32))) (type $v (func)) - (import "JSOp" "mod" (func $std/mod/JSOp.mod (param f64 f64) (result f64))) + (memory $0 1) + (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "math" "mod" (func $std/mod/mod (param f64 f64) (result f64))) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $std/mod/js i32 (i32.const 1)) (global $NaN f64 (f64.const nan:0x8000000000000)) (global $Infinity f64 (f64.const inf)) (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\n\00\00\00s\00t\00d\00/\00m\00o\00d\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) + (export "mod" (func $std/mod/mod)) (start $start) (func $~lib/math/NativeMath.mod (; 2 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64) (local $2 i64) @@ -532,7 +534,7 @@ ) (get_local $3) (call $std/mod/check - (call $std/mod/JSOp.mod + (call $std/mod/mod (get_local $0) (get_local $1) ) @@ -1036,7 +1038,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 21) + (i32.const 20) (i32.const 0) ) (unreachable) @@ -1050,6 +1052,24 @@ (f64.const 1) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 21) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmod + (f64.const -3) + (f64.const 2) + (f64.const -1) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -1064,7 +1084,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3) - (f64.const 2) + (f64.const -2) (f64.const -1) ) ) @@ -1081,9 +1101,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3) - (f64.const -2) - (f64.const -1) + (f64.const 3.5) + (f64.const 2) + (f64.const 1.5) ) ) (block @@ -1100,7 +1120,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 3.5) - (f64.const 2) + (f64.const -2) (f64.const 1.5) ) ) @@ -1117,9 +1137,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 3.5) - (f64.const -2) - (f64.const 1.5) + (f64.const -3.5) + (f64.const 2) + (f64.const -1.5) ) ) (block @@ -1136,7 +1156,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3.5) - (f64.const 2) + (f64.const -2) (f64.const -1.5) ) ) @@ -1153,9 +1173,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3.5) - (f64.const -2) - (f64.const -1.5) + (f64.const 3) + (f64.const 2.5) + (f64.const 0.5) ) ) (block @@ -1172,7 +1192,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 3) - (f64.const 2.5) + (f64.const -2.5) (f64.const 0.5) ) ) @@ -1189,9 +1209,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 3) - (f64.const -2.5) - (f64.const 0.5) + (f64.const -3) + (f64.const 2.5) + (f64.const -0.5) ) ) (block @@ -1208,7 +1228,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -3) - (f64.const 2.5) + (f64.const -2.5) (f64.const -0.5) ) ) @@ -1225,9 +1245,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -3) - (f64.const -2.5) - (f64.const -0.5) + (f64.const 0.5) + (f64.const 1) + (f64.const 0.5) ) ) (block @@ -1244,7 +1264,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 0.5) - (f64.const 1) + (f64.const -1) (f64.const 0.5) ) ) @@ -1261,9 +1281,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0.5) - (f64.const -1) - (f64.const 0.5) + (f64.const -0.5) + (f64.const 1) + (f64.const -0.5) ) ) (block @@ -1280,7 +1300,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -0.5) - (f64.const 1) + (f64.const -1) (f64.const -0.5) ) ) @@ -1297,9 +1317,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0.5) - (f64.const -1) - (f64.const -0.5) + (f64.const 1.5) + (f64.const 1) + (f64.const 0.5) ) ) (block @@ -1316,7 +1336,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1.5) - (f64.const 1) + (f64.const -1) (f64.const 0.5) ) ) @@ -1333,9 +1353,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1.5) - (f64.const -1) - (f64.const 0.5) + (f64.const -1.5) + (f64.const 1) + (f64.const -0.5) ) ) (block @@ -1352,7 +1372,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -1.5) - (f64.const 1) + (f64.const -1) (f64.const -0.5) ) ) @@ -1369,9 +1389,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1.5) - (f64.const -1) - (f64.const -0.5) + (f64.const 1.25) + (f64.const 1) + (f64.const 0.25) ) ) (block @@ -1388,7 +1408,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1.25) - (f64.const 1) + (f64.const -1) (f64.const 0.25) ) ) @@ -1405,9 +1425,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1.25) - (f64.const -1) - (f64.const 0.25) + (f64.const -1.25) + (f64.const 1) + (f64.const -0.25) ) ) (block @@ -1424,7 +1444,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const -1.25) - (f64.const 1) + (f64.const -1) (f64.const -0.25) ) ) @@ -1441,9 +1461,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1.25) - (f64.const -1) - (f64.const -0.25) + (f64.const 1) + (f64.const 1.25) + (f64.const 1) ) ) (block @@ -1460,7 +1480,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const 1) - (f64.const 1.25) + (f64.const -1.25) (f64.const 1) ) ) @@ -1477,9 +1497,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) - (f64.const -1.25) - (f64.const 1) + (f64.const -1) + (f64.const 1.25) + (f64.const -1) ) ) (block @@ -1492,24 +1512,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmod - (f64.const -1) - (f64.const 1.25) - (f64.const -1) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 47) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/mod/test_fmod @@ -1522,7 +1524,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 48) + (i32.const 47) (i32.const 0) ) (unreachable) @@ -1540,7 +1542,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 49) + (i32.const 48) (i32.const 0) ) (unreachable) @@ -1554,6 +1556,24 @@ (f64.const nan:0x8000000000000) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 51) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmod + (f64.const -0) + (f64.const 0) + (f64.const nan:0x8000000000000) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -1567,8 +1587,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1585,7 +1605,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const -0) (f64.const nan:0x8000000000000) ) @@ -1603,9 +1623,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const -0) - (f64.const nan:0x8000000000000) + (f64.const 0) + (f64.const 1) + (f64.const 0) ) ) (block @@ -1621,9 +1641,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const 1) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1639,9 +1659,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const 1) - (f64.const -0) + (f64.const 0) + (f64.const -1) + (f64.const 0) ) ) (block @@ -1657,9 +1677,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const -1) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1675,9 +1695,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const -1) - (f64.const -0) + (f64.const 1) + (f64.const 0) + (f64.const nan:0x8000000000000) ) ) (block @@ -1693,7 +1713,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const 0) (f64.const nan:0x8000000000000) ) @@ -1711,8 +1731,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const 0) + (f64.const 1) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1729,7 +1749,7 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const -0) (f64.const nan:0x8000000000000) ) @@ -1747,8 +1767,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const -0) + (f64.const nan:0x8000000000000) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -1766,7 +1786,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1784,7 +1804,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -1802,7 +1822,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -1820,7 +1840,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -1838,7 +1858,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -1856,7 +1876,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -0) + (f64.const 1) (f64.const nan:0x8000000000000) ) ) @@ -1874,7 +1894,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -1892,7 +1912,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const -1) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) ) @@ -1909,9 +1929,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) - (f64.const nan:0x8000000000000) + (f64.const 0) + (f64.const inf) + (f64.const 0) ) ) (block @@ -1927,9 +1947,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.const inf) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1945,9 +1965,11 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.const inf) - (f64.const -0) + (f64.const 0) + (f64.neg + (f64.const inf) + ) + (f64.const 0) ) ) (block @@ -1963,11 +1985,11 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 0) + (f64.const -0) (f64.neg (f64.const inf) ) - (f64.const 0) + (f64.const -0) ) ) (block @@ -1983,11 +2005,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -0) - (f64.neg - (f64.const inf) - ) - (f64.const -0) + (f64.const 1) + (f64.const inf) + (f64.const 1) ) ) (block @@ -2003,9 +2023,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.const inf) - (f64.const 1) + (f64.const -1) ) ) (block @@ -2021,9 +2041,11 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.const inf) - (f64.const -1) + (f64.const 1) + (f64.neg + (f64.const inf) + ) + (f64.const 1) ) ) (block @@ -2039,11 +2061,11 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const 1) + (f64.const -1) (f64.neg (f64.const inf) ) - (f64.const 1) + (f64.const -1) ) ) (block @@ -2059,11 +2081,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const -1) - (f64.neg - (f64.const inf) - ) - (f64.const -1) + (f64.const inf) + (f64.const 0) + (f64.const nan:0x8000000000000) ) ) (block @@ -2080,7 +2100,7 @@ (i32.eqz (call $std/mod/test_fmod (f64.const inf) - (f64.const 0) + (f64.const -0) (f64.const nan:0x8000000000000) ) ) @@ -2097,8 +2117,10 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) - (f64.const -0) + (f64.neg + (f64.const inf) + ) + (f64.const 0) (f64.const nan:0x8000000000000) ) ) @@ -2112,26 +2134,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmod - (f64.neg - (f64.const inf) - ) - (f64.const 0) - (f64.const nan:0x8000000000000) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 83) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/mod/test_fmod @@ -2146,7 +2148,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 84) + (i32.const 83) (i32.const 0) ) (unreachable) @@ -2164,7 +2166,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 85) + (i32.const 84) (i32.const 0) ) (unreachable) @@ -2178,6 +2180,26 @@ (f64.const nan:0x8000000000000) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 85) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmod + (f64.neg + (f64.const inf) + ) + (f64.const 1) + (f64.const nan:0x8000000000000) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -2194,7 +2216,7 @@ (f64.neg (f64.const inf) ) - (f64.const 1) + (f64.const -1) (f64.const nan:0x8000000000000) ) ) @@ -2211,10 +2233,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.neg - (f64.const inf) - ) - (f64.const -1) + (f64.const inf) + (f64.const inf) (f64.const nan:0x8000000000000) ) ) @@ -2231,7 +2251,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.neg + (f64.const inf) + ) (f64.const inf) (f64.const nan:0x8000000000000) ) @@ -2249,10 +2271,10 @@ (if (i32.eqz (call $std/mod/test_fmod + (f64.const inf) (f64.neg (f64.const inf) ) - (f64.const inf) (f64.const nan:0x8000000000000) ) ) @@ -2269,7 +2291,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.neg + (f64.const inf) + ) (f64.neg (f64.const inf) ) @@ -2289,12 +2313,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.neg - (f64.const inf) - ) - (f64.neg - (f64.const inf) - ) + (f64.const inf) + (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) ) @@ -2311,7 +2331,9 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.const inf) + (f64.neg + (f64.const inf) + ) (f64.const nan:0x8000000000000) (f64.const nan:0x8000000000000) ) @@ -2329,10 +2351,8 @@ (if (i32.eqz (call $std/mod/test_fmod - (f64.neg - (f64.const inf) - ) (f64.const nan:0x8000000000000) + (f64.const inf) (f64.const nan:0x8000000000000) ) ) @@ -2350,7 +2370,9 @@ (i32.eqz (call $std/mod/test_fmod (f64.const nan:0x8000000000000) - (f64.const inf) + (f64.neg + (f64.const inf) + ) (f64.const nan:0x8000000000000) ) ) @@ -2366,19 +2388,17 @@ ) (if (i32.eqz - (call $std/mod/test_fmod - (f64.const nan:0x8000000000000) - (f64.neg - (f64.const inf) - ) - (f64.const nan:0x8000000000000) + (call $std/mod/test_fmodf + (f32.const 3) + (f32.const 2) + (f32.const 1) ) ) (block (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 96) + (i32.const 104) (i32.const 0) ) (unreachable) @@ -2388,7 +2408,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3) - (f32.const 2) + (f32.const -2) (f32.const 1) ) ) @@ -2405,9 +2425,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3) - (f32.const -2) - (f32.const 1) + (f32.const -3) + (f32.const 2) + (f32.const -1) ) ) (block @@ -2424,7 +2444,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3) - (f32.const 2) + (f32.const -2) (f32.const -1) ) ) @@ -2441,9 +2461,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3) - (f32.const -2) - (f32.const -1) + (f32.const 3.5) + (f32.const 2) + (f32.const 1.5) ) ) (block @@ -2460,7 +2480,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3.5) - (f32.const 2) + (f32.const -2) (f32.const 1.5) ) ) @@ -2477,9 +2497,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3.5) - (f32.const -2) - (f32.const 1.5) + (f32.const -3.5) + (f32.const 2) + (f32.const -1.5) ) ) (block @@ -2496,7 +2516,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3.5) - (f32.const 2) + (f32.const -2) (f32.const -1.5) ) ) @@ -2513,9 +2533,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3.5) - (f32.const -2) - (f32.const -1.5) + (f32.const 3) + (f32.const 2.5) + (f32.const 0.5) ) ) (block @@ -2532,7 +2552,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 3) - (f32.const 2.5) + (f32.const -2.5) (f32.const 0.5) ) ) @@ -2549,9 +2569,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 3) - (f32.const -2.5) - (f32.const 0.5) + (f32.const -3) + (f32.const 2.5) + (f32.const -0.5) ) ) (block @@ -2568,7 +2588,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -3) - (f32.const 2.5) + (f32.const -2.5) (f32.const -0.5) ) ) @@ -2585,9 +2605,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -3) - (f32.const -2.5) - (f32.const -0.5) + (f32.const 0.5) + (f32.const 1) + (f32.const 0.5) ) ) (block @@ -2604,7 +2624,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 0.5) - (f32.const 1) + (f32.const -1) (f32.const 0.5) ) ) @@ -2621,9 +2641,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0.5) - (f32.const -1) - (f32.const 0.5) + (f32.const -0.5) + (f32.const 1) + (f32.const -0.5) ) ) (block @@ -2640,7 +2660,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -0.5) - (f32.const 1) + (f32.const -1) (f32.const -0.5) ) ) @@ -2657,9 +2677,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0.5) - (f32.const -1) - (f32.const -0.5) + (f32.const 1.5) + (f32.const 1) + (f32.const 0.5) ) ) (block @@ -2676,7 +2696,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const 1.5) - (f32.const 1) + (f32.const -1) (f32.const 0.5) ) ) @@ -2693,9 +2713,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1.5) - (f32.const -1) - (f32.const 0.5) + (f32.const -1.5) + (f32.const 1) + (f32.const -0.5) ) ) (block @@ -2712,7 +2732,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const -1.5) - (f32.const 1) + (f32.const -1) (f32.const -0.5) ) ) @@ -2729,16 +2749,16 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1.5) - (f32.const -1) - (f32.const -0.5) + (f32.const 0) + (f32.const 0) + (f32.const nan:0x400000) ) ) (block (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 124) + (i32.const 126) (i32.const 0) ) (unreachable) @@ -2747,7 +2767,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const 0) (f32.const nan:0x400000) ) @@ -2765,8 +2785,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2783,7 +2803,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const -0) (f32.const nan:0x400000) ) @@ -2801,8 +2821,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.const -0) + (f32.const 1) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2819,7 +2839,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const 0) (f32.const nan:0x400000) ) @@ -2837,8 +2857,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const 0) + (f32.const 1) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2855,7 +2875,7 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const -0) (f32.const nan:0x400000) ) @@ -2873,8 +2893,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const -0) + (f32.const nan:0x400000) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2892,7 +2912,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2910,7 +2930,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -0) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -2928,7 +2948,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -2946,7 +2966,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -1) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -2964,7 +2984,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -2982,7 +3002,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -0) + (f32.const 1) (f32.const nan:0x400000) ) ) @@ -3000,7 +3020,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -3018,7 +3038,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const -1) + (f32.const nan:0x400000) (f32.const nan:0x400000) ) ) @@ -3035,9 +3055,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const nan:0x400000) - (f32.const nan:0x400000) - (f32.const nan:0x400000) + (f32.const 0) + (f32.const inf) + (f32.const 0) ) ) (block @@ -3053,9 +3073,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.const inf) - (f32.const 0) + (f32.const -0) ) ) (block @@ -3071,9 +3091,11 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.const inf) - (f32.const -0) + (f32.const 0) + (f32.neg + (f32.const inf) + ) + (f32.const 0) ) ) (block @@ -3089,11 +3111,11 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 0) + (f32.const -0) (f32.neg (f32.const inf) ) - (f32.const 0) + (f32.const -0) ) ) (block @@ -3109,11 +3131,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -0) - (f32.neg - (f32.const inf) - ) - (f32.const -0) + (f32.const 1) + (f32.const inf) + (f32.const 1) ) ) (block @@ -3129,9 +3149,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.const inf) - (f32.const 1) + (f32.const -1) ) ) (block @@ -3147,9 +3167,11 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.const inf) - (f32.const -1) + (f32.const 1) + (f32.neg + (f32.const inf) + ) + (f32.const 1) ) ) (block @@ -3165,11 +3187,11 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const 1) + (f32.const -1) (f32.neg (f32.const inf) ) - (f32.const 1) + (f32.const -1) ) ) (block @@ -3185,11 +3207,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const -1) - (f32.neg - (f32.const inf) - ) - (f32.const -1) + (f32.const inf) + (f32.const 0) + (f32.const nan:0x400000) ) ) (block @@ -3206,7 +3226,7 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const inf) - (f32.const 0) + (f32.const -0) (f32.const nan:0x400000) ) ) @@ -3223,8 +3243,10 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) - (f32.const -0) + (f32.neg + (f32.const inf) + ) + (f32.const 0) (f32.const nan:0x400000) ) ) @@ -3238,26 +3260,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmodf - (f32.neg - (f32.const inf) - ) - (f32.const 0) - (f32.const nan:0x400000) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 154) - (i32.const 0) - ) - (unreachable) - ) - ) (if (i32.eqz (call $std/mod/test_fmodf @@ -3272,7 +3274,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 155) + (i32.const 154) (i32.const 0) ) (unreachable) @@ -3290,7 +3292,7 @@ (call $~lib/env/abort (i32.const 0) (i32.const 8) - (i32.const 156) + (i32.const 155) (i32.const 0) ) (unreachable) @@ -3304,6 +3306,26 @@ (f32.const nan:0x400000) ) ) + (block + (call $~lib/env/abort + (i32.const 0) + (i32.const 8) + (i32.const 156) + (i32.const 0) + ) + (unreachable) + ) + ) + (if + (i32.eqz + (call $std/mod/test_fmodf + (f32.neg + (f32.const inf) + ) + (f32.const 1) + (f32.const nan:0x400000) + ) + ) (block (call $~lib/env/abort (i32.const 0) @@ -3320,7 +3342,7 @@ (f32.neg (f32.const inf) ) - (f32.const 1) + (f32.const -1) (f32.const nan:0x400000) ) ) @@ -3337,10 +3359,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.neg - (f32.const inf) - ) - (f32.const -1) + (f32.const inf) + (f32.const inf) (f32.const nan:0x400000) ) ) @@ -3357,7 +3377,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.neg + (f32.const inf) + ) (f32.const inf) (f32.const nan:0x400000) ) @@ -3375,10 +3397,10 @@ (if (i32.eqz (call $std/mod/test_fmodf + (f32.const inf) (f32.neg (f32.const inf) ) - (f32.const inf) (f32.const nan:0x400000) ) ) @@ -3395,7 +3417,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.neg + (f32.const inf) + ) (f32.neg (f32.const inf) ) @@ -3415,12 +3439,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.neg - (f32.const inf) - ) - (f32.neg - (f32.const inf) - ) + (f32.const inf) + (f32.const nan:0x400000) (f32.const nan:0x400000) ) ) @@ -3437,7 +3457,9 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.const inf) + (f32.neg + (f32.const inf) + ) (f32.const nan:0x400000) (f32.const nan:0x400000) ) @@ -3455,10 +3477,8 @@ (if (i32.eqz (call $std/mod/test_fmodf - (f32.neg - (f32.const inf) - ) (f32.const nan:0x400000) + (f32.const inf) (f32.const nan:0x400000) ) ) @@ -3476,7 +3496,9 @@ (i32.eqz (call $std/mod/test_fmodf (f32.const nan:0x400000) - (f32.const inf) + (f32.neg + (f32.const inf) + ) (f32.const nan:0x400000) ) ) @@ -3490,26 +3512,6 @@ (unreachable) ) ) - (if - (i32.eqz - (call $std/mod/test_fmodf - (f32.const nan:0x400000) - (f32.neg - (f32.const inf) - ) - (f32.const nan:0x400000) - ) - ) - (block - (call $~lib/env/abort - (i32.const 0) - (i32.const 8) - (i32.const 167) - (i32.const 0) - ) - (unreachable) - ) - ) ) (func $null (; 11 ;) (type $v) ) diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index b4e6d1ef..642bd142 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -2,11 +2,14 @@ (type $ii (func (param i32) (result i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/new.untouched.wat b/tests/compiler/std/new.untouched.wat index 7ae1c7ad..e6b8398e 100644 --- a/tests/compiler/std/new.untouched.wat +++ b/tests/compiler/std/new.untouched.wat @@ -2,6 +2,9 @@ (type $ifi (func (param i32 f32) (result i32))) (type $ii (func (param i32) (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) @@ -10,10 +13,8 @@ (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (global $std/new/aClass (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 0 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 62e26fd1..4a9bf031 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -8,6 +8,10 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) + (memory $0 1) + (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -76,9 +80,8 @@ (global $std/operator-overloading/aii1 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -1689,50 +1692,45 @@ (get_local $2) ) ) - (return - (f64.mul - (get_local $13) - (tee_local $2 - (if (result f64) - (i32.le_s - (i32.shr_s - (tee_local $8 - (i32.add - (i32.wrap/i64 - (i64.shr_u - (i64.reinterpret/f64 - (tee_local $2 + (set_local $2 + (if (result f64) + (i32.le_s + (i32.shr_s + (tee_local $8 + (i32.add + (i32.wrap/i64 + (i64.shr_u + (i64.reinterpret/f64 + (tee_local $2 + (f64.sub + (f64.const 1) + (f64.sub (f64.sub - (f64.const 1) - (f64.sub - (f64.sub - (f64.div - (f64.mul + (f64.div + (f64.mul + (get_local $2) + (tee_local $9 + (f64.sub (get_local $2) - (tee_local $9 - (f64.sub - (get_local $2) + (f64.mul + (get_local $3) + (f64.add + (f64.const 0.16666666666666602) (f64.mul (get_local $3) (f64.add - (f64.const 0.16666666666666602) + (f64.const -2.7777777777015593e-03) (f64.mul (get_local $3) (f64.add - (f64.const -2.7777777777015593e-03) + (f64.const 6.613756321437934e-05) (f64.mul (get_local $3) (f64.add - (f64.const 6.613756321437934e-05) + (f64.const -1.6533902205465252e-06) (f64.mul (get_local $3) - (f64.add - (f64.const -1.6533902205465252e-06) - (f64.mul - (get_local $3) - (f64.const 4.1381367970572385e-08) - ) - ) + (f64.const 4.1381367970572385e-08) ) ) ) @@ -1743,69 +1741,75 @@ ) ) ) - (f64.sub - (get_local $9) - (f64.const 2) - ) ) - (f64.add - (tee_local $0 - (f64.sub - (get_local $6) - (f64.sub - (get_local $2) - (get_local $16) - ) - ) - ) - (f64.mul + ) + (f64.sub + (get_local $9) + (f64.const 2) + ) + ) + (f64.add + (tee_local $0 + (f64.sub + (get_local $6) + (f64.sub (get_local $2) - (get_local $0) + (get_local $16) ) ) ) - (get_local $2) + (f64.mul + (get_local $2) + (get_local $0) + ) ) ) + (get_local $2) ) ) - (i64.const 32) ) ) - (i32.shl - (get_local $7) - (i32.const 20) - ) + (i64.const 32) ) ) - (i32.const 20) - ) - (i32.const 0) - ) - (call $~lib/math/NativeMath.scalbn - (get_local $2) - (get_local $7) - ) - (f64.reinterpret/i64 - (i64.or - (i64.and - (i64.reinterpret/f64 - (get_local $2) - ) - (i64.const 4294967295) - ) - (i64.shl - (i64.extend_s/i32 - (get_local $8) - ) - (i64.const 32) + (i32.shl + (get_local $7) + (i32.const 20) ) ) ) + (i32.const 20) + ) + (i32.const 0) + ) + (call $~lib/math/NativeMath.scalbn + (get_local $2) + (get_local $7) + ) + (f64.reinterpret/i64 + (i64.or + (i64.and + (i64.reinterpret/f64 + (get_local $2) + ) + (i64.const 4294967295) + ) + (i64.shl + (i64.extend_s/i32 + (get_local $8) + ) + (i64.const 32) + ) ) ) ) ) + (return + (f64.mul + (get_local $13) + (get_local $2) + ) + ) ) (return (f64.mul @@ -1826,35 +1830,42 @@ ) ) (func $std/operator-overloading/Tester.pow (; 11 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (i32.trunc_s/f64 + (call $~lib/math/NativeMath.pow + (f64.convert_s/i32 + (i32.load + (get_local $0) + ) + ) + (f64.convert_s/i32 + (i32.load + (get_local $1) + ) + ) + ) + ) + ) + (set_local $0 + (i32.trunc_s/f64 + (call $~lib/math/NativeMath.pow + (f64.convert_s/i32 + (i32.load offset=4 + (get_local $0) + ) + ) + (f64.convert_s/i32 + (i32.load offset=4 + (get_local $1) + ) + ) + ) + ) + ) (call $std/operator-overloading/Tester#constructor - (i32.trunc_s/f64 - (call $~lib/math/NativeMath.pow - (f64.convert_s/i32 - (i32.load - (get_local $0) - ) - ) - (f64.convert_s/i32 - (i32.load - (get_local $1) - ) - ) - ) - ) - (i32.trunc_s/f64 - (call $~lib/math/NativeMath.pow - (f64.convert_s/i32 - (i32.load offset=4 - (get_local $0) - ) - ) - (f64.convert_s/i32 - (i32.load offset=4 - (get_local $1) - ) - ) - ) - ) + (get_local $2) + (get_local $0) ) ) (func $std/operator-overloading/Tester.and (; 12 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/operator-overloading.untouched.wat b/tests/compiler/std/operator-overloading.untouched.wat index 98e750f0..c00e9819 100644 --- a/tests/compiler/std/operator-overloading.untouched.wat +++ b/tests/compiler/std/operator-overloading.untouched.wat @@ -6,6 +6,10 @@ (type $FFF (func (param f64 f64) (result f64))) (type $FiF (func (param f64 i32) (result f64))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -81,11 +85,8 @@ (global $std/operator-overloading/aii2 (mut i32) (i32.const 0)) (global $std/operator-overloading/aii (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 68)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\1b\00\00\00s\00t\00d\00/\00o\00p\00e\00r\00a\00t\00o\00r\00-\00o\00v\00e\00r\00l\00o\00a\00d\00i\00n\00g\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/pointer.optimized.wat b/tests/compiler/std/pointer.optimized.wat index 670108fc..3d678dc5 100644 --- a/tests/compiler/std/pointer.optimized.wat +++ b/tests/compiler/std/pointer.optimized.wat @@ -8,6 +8,10 @@ (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$vi (func (param i32))) (type $FUNCSIG$vii (func (param i32 i32))) + (memory $0 1) + (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) @@ -15,9 +19,8 @@ (global $std/pointer/sub (mut i32) (i32.const 0)) (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $std/pointer/Pointer#constructor (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (get_local $0) diff --git a/tests/compiler/std/pointer.untouched.wat b/tests/compiler/std/pointer.untouched.wat index 8be657f1..6c4fe9cc 100644 --- a/tests/compiler/std/pointer.untouched.wat +++ b/tests/compiler/std/pointer.untouched.wat @@ -7,6 +7,10 @@ (type $iif (func (param i32 i32) (result f32))) (type $ifv (func (param i32 f32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $std/pointer/one (mut i32) (i32.const 0)) (global $std/pointer/two (mut i32) (i32.const 0)) @@ -15,11 +19,8 @@ (global $std/pointer/nextOne (mut i32) (i32.const 0)) (global $std/pointer/buf (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 40)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\0e\00\00\00s\00t\00d\00/\00p\00o\00i\00n\00t\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $std/pointer/Pointer#constructor (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (get_local $1) diff --git a/tests/compiler/std/polyfills.optimized.wat b/tests/compiler/std/polyfills.optimized.wat index 63f385b4..abd52336 100644 --- a/tests/compiler/std/polyfills.optimized.wat +++ b/tests/compiler/std/polyfills.optimized.wat @@ -4,11 +4,14 @@ (type $v (func)) (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$j (func (result i64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\11\00\00\00~\00l\00i\00b\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") (data (i32.const 48) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/polyfills/bswap16 (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/polyfills.untouched.wat b/tests/compiler/std/polyfills.untouched.wat index 92634d49..546c193d 100644 --- a/tests/compiler/std/polyfills.untouched.wat +++ b/tests/compiler/std/polyfills.untouched.wat @@ -3,14 +3,15 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $II (func (param i64) (result i64))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 84)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\11\00\00\00~\00l\00i\00b\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") (data (i32.const 48) "\10\00\00\00s\00t\00d\00/\00p\00o\00l\00y\00f\00i\00l\00l\00s\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 84)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/polyfills/bswap16 (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index dc222fa6..9ef39b48 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -21,14 +21,17 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -508,24 +511,31 @@ (get_local $2) ) (func $~lib/set/Set#clear (; 7 ;) (; has Stack IR ;) (type $iv) (param $0 i32) - (i32.store - (get_local $0) + (local $1 i32) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 16) (i32.const 0) ) ) + (i32.store + (get_local $0) + (get_local $1) + ) (i32.store offset=4 (get_local $0) (i32.const 3) ) - (i32.store offset=8 - (get_local $0) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 32) (i32.const 1) ) ) + (i32.store offset=8 + (get_local $0) + (get_local $1) + ) (i32.store offset=12 (get_local $0) (i32.const 4) @@ -659,13 +669,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 12 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -678,7 +692,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -692,7 +706,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -730,7 +744,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -757,21 +771,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash8 + (i32.load8_s + (get_local $2) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash8 - (i32.load8_s - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -781,7 +796,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -804,7 +819,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -812,7 +827,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -829,16 +844,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -961,25 +977,27 @@ ) (func $~lib/set/Set#delete (; 16 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash8 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 24) + ) + (i32.const 24) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash8 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 24) - ) - (i32.const 24) - ) - ) - ) + (get_local $0) ) ) ) @@ -1411,13 +1429,17 @@ ) ) (func $~lib/set/Set#has (; 19 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -1430,7 +1452,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -1444,7 +1466,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -1482,7 +1504,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -1509,21 +1531,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash8 + (i32.load8_u + (get_local $2) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash8 - (i32.load8_u - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -1533,7 +1556,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -1556,7 +1579,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -1564,7 +1587,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -1581,16 +1604,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -1708,22 +1732,24 @@ ) (func $~lib/set/Set#delete (; 22 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash8 + (i32.and + (get_local $1) + (i32.const 255) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash8 - (i32.and - (get_local $1) - (i32.const 255) - ) - ) - ) + (get_local $0) ) ) ) @@ -2245,13 +2271,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 27 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -2264,7 +2294,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -2278,7 +2308,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -2316,7 +2346,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -2343,21 +2373,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash16 + (i32.load16_s + (get_local $2) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash16 - (i32.load16_s - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -2367,7 +2398,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -2390,7 +2421,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -2398,7 +2429,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -2415,16 +2446,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -2542,25 +2574,27 @@ ) (func $~lib/set/Set#delete (; 30 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash16 + (i32.shr_s + (i32.shl + (get_local $1) + (i32.const 16) + ) + (i32.const 16) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash16 - (i32.shr_s - (i32.shl - (get_local $1) - (i32.const 16) - ) - (i32.const 16) - ) - ) - ) + (get_local $0) ) ) ) @@ -2992,13 +3026,17 @@ ) ) (func $~lib/set/Set#has (; 33 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -3011,7 +3049,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -3025,7 +3063,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -3063,7 +3101,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -3090,21 +3128,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash16 + (i32.load16_u + (get_local $2) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash16 - (i32.load16_u - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -3114,7 +3153,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -3137,7 +3176,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -3145,7 +3184,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -3162,16 +3201,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -3289,22 +3329,24 @@ ) (func $~lib/set/Set#delete (; 36 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash16 + (i32.and + (get_local $1) + (i32.const 65535) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash16 - (i32.and - (get_local $1) - (i32.const 65535) - ) - ) - ) + (get_local $0) ) ) ) @@ -3841,13 +3883,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 41 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -3860,7 +3906,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -3874,7 +3920,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -3912,7 +3958,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -3939,21 +3985,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash32 + (i32.load + (get_local $2) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash32 - (i32.load - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -3963,7 +4010,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -3986,7 +4033,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -3994,7 +4041,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -4011,16 +4058,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -4138,19 +4186,21 @@ ) (func $~lib/set/Set#delete (; 44 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash32 - (get_local $1) - ) - ) + (get_local $0) ) ) ) @@ -4916,24 +4966,31 @@ ) ) (func $~lib/set/Set#clear (; 47 ;) (; has Stack IR ;) (type $iv) (param $0 i32) - (i32.store - (get_local $0) + (local $1 i32) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 16) (i32.const 0) ) ) + (i32.store + (get_local $0) + (get_local $1) + ) (i32.store offset=4 (get_local $0) (i32.const 3) ) - (i32.store offset=8 - (get_local $0) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 64) (i32.const 1) ) ) + (i32.store offset=8 + (get_local $0) + (get_local $1) + ) (i32.store offset=12 (get_local $0) (i32.const 4) @@ -5148,13 +5205,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 52 ;) (; has Stack IR ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -5167,7 +5228,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -5181,7 +5242,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -5219,7 +5280,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -5246,21 +5307,22 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash64 + (i64.load + (get_local $2) + ) + ) + ) (i32.store offset=8 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash64 - (i64.load - (get_local $2) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -5270,7 +5332,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -5293,7 +5355,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -5301,7 +5363,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -5318,16 +5380,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -5446,19 +5509,21 @@ (func $~lib/set/Set#delete (; 55 ;) (; has Stack IR ;) (type $iIi) (param $0 i32) (param $1 i64) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash64 + (get_local $1) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash64 - (get_local $1) - ) - ) + (get_local $0) ) ) ) @@ -6294,13 +6359,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 60 ;) (; has Stack IR ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -6313,7 +6382,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -6327,7 +6396,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -6365,7 +6434,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -6392,23 +6461,24 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (f32.load + (get_local $2) + ) + ) + ) + ) (i32.store offset=4 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (f32.load - (get_local $2) - ) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -6418,7 +6488,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -6441,7 +6511,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -6449,7 +6519,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -6466,16 +6536,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -6594,21 +6665,23 @@ (func $~lib/set/Set#delete (; 63 ;) (; has Stack IR ;) (type $ifi) (param $0 i32) (param $1 f32) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash32 + (i32.reinterpret/f32 + (get_local $1) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash32 - (i32.reinterpret/f32 - (get_local $1) - ) - ) - ) + (get_local $0) ) ) ) @@ -7110,13 +7183,17 @@ (i32.const 0) ) (func $~lib/set/Set#has (; 67 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (i32.ne (call $~lib/set/Set#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) @@ -7129,7 +7206,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -7143,7 +7220,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $7 @@ -7181,7 +7258,7 @@ ) (set_local $3 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -7208,23 +7285,24 @@ (get_local $2) ) ) + (set_local $4 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (f64.load + (get_local $2) + ) + ) + ) + ) (i32.store offset=8 (get_local $3) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (f64.load - (get_local $2) - ) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -7234,7 +7312,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $3) ) (set_local $3 @@ -7257,7 +7335,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -7265,7 +7343,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -7282,16 +7360,17 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (set_local $4 + (call $~lib/internal/hash/hash + (get_local $1) + ) + ) (if (i32.eqz (call $~lib/set/Set#find (get_local $0) (get_local $1) - (tee_local $4 - (call $~lib/internal/hash/hash - (get_local $1) - ) - ) + (get_local $4) ) ) (block @@ -7410,21 +7489,23 @@ (func $~lib/set/Set#delete (; 70 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i32) (local $3 i32) + (set_local $2 + (get_local $0) + ) + (set_local $0 + (call $~lib/internal/hash/hash64 + (i64.reinterpret/f64 + (get_local $1) + ) + ) + ) (if (i32.eqz (tee_local $0 (call $~lib/set/Set#find - (tee_local $2 - (get_local $0) - ) + (get_local $2) (get_local $1) - (tee_local $0 - (call $~lib/internal/hash/hash64 - (i64.reinterpret/f64 - (get_local $1) - ) - ) - ) + (get_local $0) ) ) ) diff --git a/tests/compiler/std/set.untouched.wat b/tests/compiler/std/set.untouched.wat index ffcb6462..3b86cccd 100644 --- a/tests/compiler/std/set.untouched.wat +++ b/tests/compiler/std/set.untouched.wat @@ -19,6 +19,12 @@ (type $Fi (func (param f64) (result i32))) (type $iFii (func (param i32 f64 i32) (result i32))) (type $iFv (func (param i32 f64))) + (memory $0 1) + (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -36,13 +42,8 @@ (global $~lib/set/FREE_FACTOR f64 (f64.const 0.75)) (global $~lib/set/FILL_FACTOR f64 (f64.const 2.6666666666666665)) (global $HEAP_BASE i32 (i32.const 144)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 56) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 120) "\n\00\00\00s\00t\00d\00/\00s\00e\00t\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/allocator/arena/__memory_allocate (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 702fcb82..6cba95a4 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -10,9 +10,6 @@ (type $FUNCSIG$ji (func (param i32) (result i64))) (type $FUNCSIG$fi (func (param i32) (result f32))) (type $FUNCSIG$di (func (param i32) (result f64))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02") (data (i32.const 24) "\08\00\00\00\02") @@ -27,7 +24,13 @@ (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s") (data (i32.const 216) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) (local $1 i32) @@ -2198,13 +2201,16 @@ (unreachable) ) ) + (set_local $3 + (call $~lib/internal/arraybuffer/computeSize + (get_local $2) + ) + ) (if (i32.le_s (get_local $1) (i32.sub - (call $~lib/internal/arraybuffer/computeSize - (get_local $2) - ) + (get_local $3) (i32.const 8) ) ) diff --git a/tests/compiler/std/static-array.untouched.wat b/tests/compiler/std/static-array.untouched.wat index 52aca273..c3dc6790 100644 --- a/tests/compiler/std/static-array.untouched.wat +++ b/tests/compiler/std/static-array.untouched.wat @@ -10,6 +10,20 @@ (type $iiF (func (param i32 i32) (result f64))) (type $iiFv (func (param i32 i32 f64))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") + (data (i32.const 24) "\08\00\00\00\02\00\00\00") + (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") + (data (i32.const 64) " \00\00\00\02\00\00\00") + (data (i32.const 72) "\08\00\00\00\00\00\00\00\00\00\c0?\00\00 @") + (data (i32.const 88) "H\00\00\00\02\00\00\00") + (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@\00\00\00\00\00\00\00\00") + (data (i32.const 128) "`\00\00\00\02\00\00\00") + (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 216) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -24,21 +38,8 @@ (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) (global $HEAP_BASE i32 (i32.const 276)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00\00\00\00\00\01\00\00\00\02\00\00\00") - (data (i32.const 24) "\08\00\00\00\02\00\00\00") - (data (i32.const 32) "\10\00\00\00\00\00\00\00\03\00\00\00\00\00\00\00\04\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00") - (data (i32.const 64) " \00\00\00\02\00\00\00") - (data (i32.const 72) "\08\00\00\00\00\00\00\00\00\00\c0?\00\00 @") - (data (i32.const 88) "H\00\00\00\02\00\00\00") - (data (i32.const 96) "\10\00\00\00\00\00\00\00\00\00\00\00\00\00\f4?\00\00\00\00\00\00\02@\00\00\00\00\00\00\00\00") - (data (i32.const 128) "`\00\00\00\02\00\00\00") - (data (i32.const 136) "\13\00\00\00s\00t\00d\00/\00s\00t\00a\00t\00i\00c\00-\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 184) "\0d\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 216) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/array/Array#__get (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) diff --git a/tests/compiler/std/string-utf8.optimized.wat b/tests/compiler/std/string-utf8.optimized.wat index e0665893..d38c6881 100644 --- a/tests/compiler/std/string-utf8.optimized.wat +++ b/tests/compiler/std/string-utf8.optimized.wat @@ -6,12 +6,6 @@ (type $v (func)) (type $FUNCSIG$v (func)) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $std/string-utf8/str (mut i32) (i32.const 8)) - (global $std/string-utf8/len (mut i32) (i32.const 0)) - (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s") @@ -21,7 +15,16 @@ (data (i32.const 168) "\02\00\00\00h\00i") (data (i32.const 176) "\02\00\00\00R\d8b\df") (data (i32.const 184) "\01") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $std/string-utf8/str (mut i32) (i32.const 8)) + (global $std/string-utf8/len (mut i32) (i32.const 0)) + (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/string/String#get:lengthUTF8 (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -2649,16 +2652,18 @@ ) ) (call $~lib/internal/memory/memmove - (i32.add - (tee_local $0 - (call $~lib/internal/string/allocateUnsafe - (i32.shr_u - (get_local $3) - (i32.const 1) + (tee_local $4 + (i32.add + (tee_local $0 + (call $~lib/internal/string/allocateUnsafe + (i32.shr_u + (get_local $3) + (i32.const 1) + ) ) ) + (i32.const 4) ) - (i32.const 4) ) (get_local $6) (get_local $3) diff --git a/tests/compiler/std/string-utf8.untouched.wat b/tests/compiler/std/string-utf8.untouched.wat index ee1949b4..0ae2b1c2 100644 --- a/tests/compiler/std/string-utf8.untouched.wat +++ b/tests/compiler/std/string-utf8.untouched.wat @@ -6,6 +6,18 @@ (type $iv (func (param i32))) (type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") + (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") + (data (i32.const 64) "\00\00\00\00") + (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") + (data (i32.const 160) "\02\00\00\00\01\d87\dc") + (data (i32.const 168) "\02\00\00\00h\00i\00") + (data (i32.const 176) "\02\00\00\00R\d8b\df") + (data (i32.const 184) "\01\00\00\00\00\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -19,19 +31,8 @@ (global $std/string-utf8/ptr (mut i32) (i32.const 0)) (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) (global $HEAP_BASE i32 (i32.const 192)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\06\00\00\00\01\d87\dch\00i\00R\d8b\df") - (data (i32.const 24) "\12\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00-\00u\00t\00f\008\00.\00t\00s\00") - (data (i32.const 64) "\00\00\00\00") - (data (i32.const 72) "\0e\00\00\00~\00l\00i\00b\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 104) "\17\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") - (data (i32.const 160) "\02\00\00\00\01\d87\dc") - (data (i32.const 168) "\02\00\00\00h\00i\00") - (data (i32.const 176) "\02\00\00\00R\d8b\df") - (data (i32.const 184) "\01\00\00\00\00\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/string/String#get:lengthUTF8 (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index 64a29608..1f3351af 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -19,21 +19,6 @@ (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$di (func (param i32) (result f64))) (type $FUNCSIG$v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) - (global $std/string/str (mut i32) (i32.const 8)) - (global $std/string/nullStr (mut i32) (i32.const 0)) - (global $~argc (mut i32) (i32.const 0)) - (global $std/string/c (mut i32) (i32.const 0)) - (global $std/string/a (mut i32) (i32.const 0)) - (global $std/string/b (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g") (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s") @@ -172,7 +157,25 @@ (data (i32.const 5520) "\0b\00\00\000\00.\000\000\000\000\003\005\006\008\009") (data (i32.const 5552) "\16\00\00\003\00.\004\000\002\008\002\003\004\006\006\003\008\005\002\008\008\006\00e\00+\003\008") (data (i32.const 5600) "\15\00\00\001\00.\001\009\002\000\009\002\008\009\005\005\000\007\008\001\002\005\00e\00-\007") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/internal/number/_K (mut i32) (i32.const 0)) + (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $std/string/str (mut i32) (i32.const 8)) + (global $std/string/nullStr (mut i32) (i32.const 0)) + (global $~argc (mut i32) (i32.const 0)) + (global $std/string/c (mut i32) (i32.const 0)) + (global $std/string/a (mut i32) (i32.const 0)) + (global $std/string/b (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getString" (func $std/string/getString)) (start $start) (func $~lib/string/String#charCodeAt (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$ii) (param $0 i32) (result i32) @@ -2794,6 +2797,7 @@ (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) (if (i32.eqz (get_local $0) @@ -2815,7 +2819,7 @@ ) (if (i32.eqz - (tee_local $4 + (tee_local $5 (i32.lt_s (get_local $1) (tee_local $6 @@ -2826,89 +2830,90 @@ ) ) ) - (set_local $4 + (set_local $5 (i32.eqz (get_local $3) ) ) ) (if - (get_local $4) + (get_local $5) (return (get_local $0) ) ) - (set_local $5 + (set_local $4 + (i32.sub + (get_local $1) + (get_local $6) + ) + ) + (set_local $1 (call $~lib/internal/string/allocateUnsafe (get_local $1) ) ) (if (i32.gt_s - (tee_local $1 - (i32.sub - (get_local $1) - (get_local $6) - ) - ) + (get_local $4) (get_local $3) ) (block (set_local $3 - (i32.mul - (tee_local $4 - (i32.div_s - (i32.sub - (get_local $1) - (i32.const 1) + (i32.sub + (get_local $4) + (tee_local $7 + (i32.mul + (tee_local $5 + (i32.div_s + (i32.sub + (get_local $4) + (i32.const 1) + ) + (get_local $3) + ) ) (get_local $3) ) ) - (get_local $3) ) ) (call $~lib/internal/string/repeatUnsafe - (get_local $5) + (get_local $1) (i32.const 0) (get_local $2) - (get_local $4) + (get_local $5) ) (if - (tee_local $4 - (i32.sub - (get_local $1) - (get_local $3) - ) - ) + (get_local $3) (call $~lib/internal/string/copyUnsafe - (get_local $5) - (get_local $3) + (get_local $1) + (get_local $7) (get_local $2) (i32.const 0) - (get_local $4) + (get_local $3) ) ) ) (call $~lib/internal/string/copyUnsafe - (get_local $5) + (get_local $1) (i32.const 0) (get_local $2) (i32.const 0) - (get_local $1) + (get_local $4) ) ) (if (get_local $6) (call $~lib/internal/string/copyUnsafe - (get_local $5) (get_local $1) + (get_local $4) (get_local $0) (i32.const 0) (get_local $6) ) ) - (get_local $5) + (get_local $1) ) (func $~lib/string/String#padStart|trampoline (; 18 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -2938,7 +2943,6 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) (if (i32.eqz (get_local $0) @@ -2953,17 +2957,17 @@ (unreachable) ) ) - (set_local $5 + (set_local $4 (i32.load (get_local $2) ) ) (if (i32.eqz - (tee_local $4 + (tee_local $3 (i32.lt_s (get_local $1) - (tee_local $3 + (tee_local $5 (i32.load (get_local $0) ) @@ -2971,22 +2975,22 @@ ) ) ) - (set_local $4 + (set_local $3 (i32.eqz - (get_local $5) + (get_local $4) ) ) ) (if - (get_local $4) + (get_local $3) (return (get_local $0) ) ) - (set_local $6 + (set_local $3 (i32.sub (get_local $1) - (get_local $3) + (get_local $5) ) ) (set_local $1 @@ -2995,66 +2999,66 @@ ) ) (if - (get_local $3) + (get_local $5) (call $~lib/internal/string/copyUnsafe (get_local $1) (i32.const 0) (get_local $0) (i32.const 0) - (get_local $3) + (get_local $5) ) ) (if (i32.gt_s - (get_local $6) - (get_local $5) + (get_local $3) + (get_local $4) ) (block (set_local $0 - (i32.mul + (i32.sub + (get_local $3) (tee_local $4 - (i32.div_s - (i32.sub - (get_local $6) - (i32.const 1) + (i32.mul + (tee_local $3 + (i32.div_s + (i32.sub + (get_local $3) + (i32.const 1) + ) + (get_local $4) + ) ) - (get_local $5) + (get_local $4) ) ) - (get_local $5) ) ) (call $~lib/internal/string/repeatUnsafe (get_local $1) - (get_local $3) + (get_local $5) (get_local $2) - (get_local $4) + (get_local $3) ) (if - (tee_local $4 - (i32.sub - (get_local $6) - (get_local $0) - ) - ) + (get_local $0) (call $~lib/internal/string/copyUnsafe (get_local $1) (i32.add - (get_local $0) - (get_local $3) + (get_local $4) + (get_local $5) ) (get_local $2) (i32.const 0) - (get_local $4) + (get_local $0) ) ) ) (call $~lib/internal/string/copyUnsafe (get_local $1) - (get_local $3) + (get_local $5) (get_local $2) (i32.const 0) - (get_local $6) + (get_local $3) ) ) (get_local $1) @@ -4555,7 +4559,7 @@ ) ) (if - (tee_local $1 + (tee_local $2 (i32.lt_s (get_local $0) (i32.const 0) @@ -4569,14 +4573,16 @@ ) ) (call $~lib/internal/number/utoa32_lut - (tee_local $2 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount32 + (get_local $0) + ) ) - (get_local $1) + (get_local $2) ) ) ) @@ -4585,13 +4591,13 @@ (get_local $3) ) (if - (get_local $1) + (get_local $2) (i32.store16 offset=4 - (get_local $2) + (get_local $1) (i32.const 45) ) ) - (get_local $2) + (get_local $1) ) (func $~lib/internal/number/utoa32 (; 38 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) @@ -4895,7 +4901,7 @@ ) ) (if - (tee_local $1 + (tee_local $2 (i64.lt_s (get_local $0) (i64.const 0) @@ -4914,50 +4920,54 @@ (i64.const 4294967295) ) (call $~lib/internal/number/utoa32_lut - (tee_local $3 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe - (tee_local $2 + (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount32 - (tee_local $4 - (i32.wrap/i64 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount32 + (tee_local $4 + (i32.wrap/i64 + (get_local $0) + ) ) ) ) - (get_local $1) + (get_local $2) ) ) ) ) (get_local $4) - (get_local $2) + (get_local $3) ) (call $~lib/internal/number/utoa64_lut - (tee_local $3 + (tee_local $1 (call $~lib/internal/string/allocateUnsafe - (tee_local $2 + (tee_local $3 (i32.add - (call $~lib/internal/number/decimalCount64 - (get_local $0) + (tee_local $1 + (call $~lib/internal/number/decimalCount64 + (get_local $0) + ) ) - (get_local $1) + (get_local $2) ) ) ) ) (get_local $0) - (get_local $2) + (get_local $3) ) ) (if - (get_local $1) + (get_local $2) (i32.store16 offset=4 - (get_local $3) + (get_local $1) (i32.const 45) ) ) - (get_local $3) + (get_local $1) ) (func $~lib/builtins/isFinite (; 43 ;) (; has Stack IR ;) (type $Fi) (param $0 f64) (result i32) (f64.eq @@ -5600,10 +5610,10 @@ ) ) (if - (tee_local $3 + (tee_local $4 (i32.le_s (get_local $1) - (tee_local $4 + (tee_local $3 (i32.add (get_local $1) (get_local $2) @@ -5611,40 +5621,40 @@ ) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 21) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (block $break|0 - (set_local $3 + (set_local $4 (get_local $1) ) (loop $repeat|0 (br_if $break|0 (i32.ge_s - (get_local $3) (get_local $4) + (get_local $3) ) ) (i32.store16 offset=4 (i32.add (get_local $0) (i32.shl - (get_local $3) + (get_local $4) (i32.const 1) ) ) (i32.const 48) ) - (set_local $3 + (set_local $4 (i32.add - (get_local $3) + (get_local $4) (i32.const 1) ) ) @@ -5655,42 +5665,42 @@ (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 3145774) ) (i32.add - (get_local $4) + (get_local $3) (i32.const 2) ) ) (block (result i32) (if - (tee_local $3 + (tee_local $4 (i32.gt_s - (get_local $4) + (get_local $3) (i32.const 0) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 21) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (call $~lib/internal/memory/memmove (i32.add - (tee_local $3 + (tee_local $4 (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) @@ -5698,7 +5708,7 @@ (i32.const 6) ) (i32.add - (get_local $3) + (get_local $4) (i32.const 4) ) (i32.shl @@ -5713,7 +5723,7 @@ (i32.add (get_local $0) (i32.shl - (get_local $4) + (get_local $3) (i32.const 1) ) ) @@ -5726,21 +5736,21 @@ ) (block (result i32) (if - (tee_local $3 + (tee_local $4 (i32.lt_s (i32.const -6) - (get_local $4) + (get_local $3) ) ) - (set_local $3 + (set_local $4 (i32.le_s - (get_local $4) + (get_local $3) (i32.const 0) ) ) ) (if (result i32) - (get_local $3) + (get_local $4) (block (result i32) (call $~lib/internal/memory/memmove (i32.add @@ -5749,10 +5759,10 @@ (i32.const 4) ) (i32.shl - (tee_local $3 + (tee_local $4 (i32.sub (i32.const 2) - (get_local $4) + (get_local $3) ) ) (i32.const 1) @@ -5772,29 +5782,29 @@ (i32.const 3014704) ) (block $break|1 - (set_local $2 + (set_local $3 (i32.const 2) ) (loop $repeat|1 (br_if $break|1 (i32.ge_s - (get_local $2) (get_local $3) + (get_local $4) ) ) (i32.store16 offset=4 (i32.add (get_local $0) (i32.shl - (get_local $2) + (get_local $3) (i32.const 1) ) ) (i32.const 48) ) - (set_local $2 + (set_local $3 (i32.add - (get_local $2) + (get_local $3) (i32.const 1) ) ) @@ -5803,7 +5813,7 @@ ) (i32.add (get_local $1) - (get_local $3) + (get_local $4) ) ) (if (result i32) @@ -5816,7 +5826,7 @@ (get_local $0) (i32.const 101) ) - (set_local $3 + (set_local $4 (i32.add (get_local $0) (i32.const 4) @@ -5825,36 +5835,37 @@ (if (tee_local $0 (i32.lt_s - (tee_local $2 + (tee_local $3 (i32.sub - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 0) ) ) - (set_local $2 + (set_local $3 (i32.sub (i32.const 0) - (get_local $2) + (get_local $3) ) ) ) + (set_local $2 + (i32.add + (call $~lib/internal/number/decimalCount32 + (get_local $3) + ) + (i32.const 1) + ) + ) (call $~lib/internal/number/utoa32_lut + (get_local $4) (get_local $3) (get_local $2) - (tee_local $2 - (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) - (i32.const 1) - ) - ) ) (i32.store16 offset=4 - (get_local $3) + (get_local $4) (select (i32.const 45) (i32.const 43) @@ -5899,7 +5910,7 @@ ) (i32.const 101) ) - (set_local $3 + (set_local $4 (i32.add (get_local $0) (i32.const 4) @@ -5908,36 +5919,37 @@ (if (tee_local $0 (i32.lt_s - (tee_local $2 + (tee_local $3 (i32.sub - (get_local $4) + (get_local $3) (i32.const 1) ) ) (i32.const 0) ) ) - (set_local $2 + (set_local $3 (i32.sub (i32.const 0) - (get_local $2) + (get_local $3) ) ) ) + (set_local $2 + (i32.add + (call $~lib/internal/number/decimalCount32 + (get_local $3) + ) + (i32.const 1) + ) + ) (call $~lib/internal/number/utoa32_lut + (get_local $4) (get_local $3) (get_local $2) - (tee_local $2 - (i32.add - (call $~lib/internal/number/decimalCount32 - (get_local $2) - ) - (i32.const 1) - ) - ) ) (i32.store16 offset=4 - (get_local $3) + (get_local $4) (select (i32.const 45) (i32.const 43) @@ -5961,8 +5973,8 @@ ) (func $~lib/internal/number/dtoa_core (; 47 ;) (; has Stack IR ;) (type $iFi) (param $0 i32) (param $1 f64) (result i32) (local $2 i64) - (local $3 i64) - (local $4 i32) + (local $3 i32) + (local $4 i64) (local $5 i32) (local $6 i64) (local $7 i64) @@ -5970,12 +5982,13 @@ (local $9 i64) (local $10 i64) (local $11 i64) - (local $12 i32) - (local $13 i32) + (local $12 i64) + (local $13 i64) (local $14 i32) - (local $15 i64) + (local $15 i32) + (local $16 i32) (if - (tee_local $12 + (tee_local $14 (f64.lt (get_local $1) (f64.const 0) @@ -5997,9 +6010,9 @@ (i64.add (i64.shl (i64.extend_u/i32 - (tee_local $5 + (tee_local $3 (i32.ne - (tee_local $13 + (tee_local $15 (i32.wrap/i64 (i64.shr_u (i64.and @@ -6026,14 +6039,14 @@ ) ) ) - (set_local $5 + (set_local $3 (i32.sub - (tee_local $13 + (tee_local $15 (i32.sub (select - (get_local $13) + (get_local $15) (i32.const 1) - (get_local $5) + (get_local $3) ) (i32.const 1075) ) @@ -6041,10 +6054,10 @@ (i32.const 1) ) ) - (set_local $4 + (set_local $16 (i32.wrap/i64 (i64.clz - (tee_local $6 + (tee_local $4 (i64.add (i64.shl (get_local $2) @@ -6058,9 +6071,9 @@ ) (set_global $~lib/internal/number/_frc_plus (i64.shl - (get_local $6) + (get_local $4) (i64.extend_s/i32 - (get_local $4) + (get_local $16) ) ) ) @@ -6070,7 +6083,7 @@ (i64.shl (get_local $2) (i64.extend_s/i32 - (tee_local $14 + (tee_local $5 (i32.add (i64.eq (get_local $2) @@ -6086,13 +6099,13 @@ (i64.extend_s/i32 (i32.sub (i32.sub - (get_local $13) - (get_local $14) + (get_local $15) + (get_local $5) ) - (tee_local $5 + (tee_local $3 (i32.sub - (get_local $5) - (get_local $4) + (get_local $3) + (get_local $16) ) ) ) @@ -6100,17 +6113,17 @@ ) ) (set_global $~lib/internal/number/_exp - (get_local $5) + (get_local $3) ) (set_global $~lib/internal/number/_K (i32.sub (i32.const 348) (i32.shl - (tee_local $5 + (tee_local $3 (i32.add (i32.shr_s (i32.add - (tee_local $4 + (tee_local $16 (i32.trunc_s/f64 (tee_local $1 (f64.add @@ -6130,7 +6143,7 @@ ) (f64.ne (f64.convert_s/i32 - (get_local $4) + (get_local $16) ) (get_local $1) ) @@ -6144,7 +6157,7 @@ ) ) ) - (set_local $4 + (set_local $5 (i32.load (i32.const 4024) ) @@ -6156,7 +6169,7 @@ (i32.const 3760) ) (i32.shl - (get_local $5) + (get_local $3) (i32.const 3) ) ) @@ -6165,9 +6178,9 @@ (set_global $~lib/internal/number/_exp_pow (i32.load16_s offset=8 (i32.add - (get_local $4) + (get_local $5) (i32.shl - (get_local $5) + (get_local $3) (i32.const 1) ) ) @@ -6181,7 +6194,7 @@ (i64.shl (get_local $2) (i64.extend_s/i32 - (tee_local $4 + (tee_local $5 (i32.wrap/i64 (i64.clz (get_local $2) @@ -6196,7 +6209,7 @@ ) (tee_local $8 (i64.and - (tee_local $6 + (tee_local $4 (get_global $~lib/internal/number/_frc_pow) ) (i64.const 4294967295) @@ -6210,13 +6223,13 @@ (get_local $7) (tee_local $10 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $6 (i64.add (i64.mul (tee_local $11 @@ -6245,7 +6258,7 @@ (get_local $10) ) (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) @@ -6262,7 +6275,7 @@ (i64.mul (tee_local $9 (i64.and - (tee_local $3 + (tee_local $6 (get_global $~lib/internal/number/_frc_plus) ) (i64.const 4294967295) @@ -6270,30 +6283,30 @@ ) (tee_local $10 (i64.and - (get_local $6) + (get_local $4) (i64.const 4294967295) ) ) ) ) - (set_local $7 + (set_local $13 (i64.add (i64.mul (get_local $9) (tee_local $8 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $12 (i64.add (i64.mul (tee_local $11 (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) @@ -6309,7 +6322,7 @@ ) ) ) - (set_local $15 + (set_local $13 (i64.add (i64.add (i64.mul @@ -6317,13 +6330,13 @@ (get_local $8) ) (i64.shr_u - (get_local $3) + (get_local $12) (i64.const 32) ) ) (i64.shr_u (i64.add - (get_local $7) + (get_local $13) (i64.const 2147483647) ) (i64.const 32) @@ -6334,7 +6347,7 @@ (i64.mul (tee_local $7 (i64.and - (tee_local $3 + (tee_local $12 (get_global $~lib/internal/number/_frc_minus) ) (i64.const 4294967295) @@ -6342,30 +6355,30 @@ ) (tee_local $8 (i64.and - (get_local $6) + (get_local $4) (i64.const 4294967295) ) ) ) ) - (set_local $6 + (set_local $12 (i64.add (i64.mul (get_local $7) (tee_local $10 (i64.shr_u - (get_local $6) + (get_local $4) (i64.const 32) ) ) ) (i64.and - (tee_local $3 + (tee_local $6 (i64.add (i64.mul (tee_local $11 (i64.shr_u - (get_local $3) + (get_local $12) (i64.const 32) ) ) @@ -6381,11 +6394,11 @@ ) ) ) - (set_local $3 + (set_local $6 (i64.sub - (tee_local $7 + (tee_local $13 (i64.sub - (get_local $15) + (get_local $13) (i64.const 1) ) ) @@ -6397,13 +6410,13 @@ (get_local $10) ) (i64.shr_u - (get_local $3) + (get_local $6) (i64.const 32) ) ) (i64.shr_u (i64.add - (get_local $6) + (get_local $12) (i64.const 2147483647) ) (i64.const 32) @@ -6413,49 +6426,54 @@ ) ) ) - (i32.add - (call $~lib/internal/number/prettify - (i32.add - (get_local $0) - (i32.shl - (get_local $12) - (i32.const 1) - ) - ) - (i32.sub - (call $~lib/internal/number/genDigits - (get_local $0) - (get_local $2) - (tee_local $5 + (set_local $3 + (call $~lib/internal/number/genDigits + (get_local $0) + (get_local $2) + (tee_local $3 + (i32.sub + (i32.add (i32.sub - (i32.add - (i32.sub - (get_local $13) - (get_local $4) - ) - (tee_local $4 - (get_global $~lib/internal/number/_exp_pow) - ) - ) - (i32.const -64) + (get_local $15) + (get_local $5) + ) + (tee_local $5 + (get_global $~lib/internal/number/_exp_pow) ) ) - (get_local $7) - (i32.sub - (i32.add - (get_global $~lib/internal/number/_exp) - (get_local $4) - ) - (i32.const -64) - ) - (get_local $3) - (get_local $12) + (i32.const -64) ) - (get_local $12) ) - (get_global $~lib/internal/number/_K) + (get_local $13) + (i32.sub + (i32.add + (get_global $~lib/internal/number/_exp) + (get_local $5) + ) + (i32.const -64) + ) + (get_local $6) + (get_local $14) ) - (get_local $12) + ) + (i32.add + (tee_local $3 + (call $~lib/internal/number/prettify + (i32.add + (get_local $0) + (i32.shl + (get_local $14) + (i32.const 1) + ) + ) + (i32.sub + (get_local $3) + (get_local $14) + ) + (get_global $~lib/internal/number/_K) + ) + ) + (get_local $14) ) ) (func $~lib/string/String#substring (; 48 ;) (; has Stack IR ;) (type $FUNCSIG$iii) (param $0 i32) (param $1 i32) (result i32) @@ -6650,6 +6668,8 @@ (get_local $2) ) (func $start (; 51 ;) (; has Stack IR ;) (type $v) + (local $0 i32) + (local $1 i32) (set_global $~lib/allocator/arena/startOffset (i32.const 5648) ) @@ -8155,14 +8175,20 @@ (i32.const 65377) ) ) + (set_local $0 + (call $~lib/string/String.fromCodePoint + (i32.const 55296) + ) + ) + (set_local $1 + (call $~lib/string/String.fromCodePoint + (i32.const 56322) + ) + ) (set_global $std/string/b (call $~lib/string/String.__concat - (call $~lib/string/String.fromCodePoint - (i32.const 55296) - ) - (call $~lib/string/String.fromCodePoint - (i32.const 56322) - ) + (get_local $0) + (get_local $1) ) ) (if diff --git a/tests/compiler/std/string.untouched.wat b/tests/compiler/std/string.untouched.wat index f244bd73..55668756 100644 --- a/tests/compiler/std/string.untouched.wat +++ b/tests/compiler/std/string.untouched.wat @@ -16,73 +16,6 @@ (type $iIiIiIii (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) (type $iv (func (param i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) - (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) - (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) - (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) - (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) - (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) - (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) - (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) - (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) - (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) - (global $~lib/internal/number/MAX_DOUBLE_LENGTH i32 (i32.const 28)) - (global $~lib/internal/number/_K (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) - (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) - (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) - (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) - (global $std/string/str (mut i32) (i32.const 8)) - (global $std/string/nullStr (mut i32) (i32.const 0)) - (global $~argc (mut i32) (i32.const 0)) - (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) - (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) - (global $NaN f64 (f64.const nan:0x8000000000000)) - (global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43)) - (global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45)) - (global $~lib/internal/string/CharCode.DOT i32 (i32.const 46)) - (global $~lib/internal/string/CharCode._0 i32 (i32.const 48)) - (global $~lib/internal/string/CharCode._1 i32 (i32.const 49)) - (global $~lib/internal/string/CharCode._2 i32 (i32.const 50)) - (global $~lib/internal/string/CharCode._3 i32 (i32.const 51)) - (global $~lib/internal/string/CharCode._4 i32 (i32.const 52)) - (global $~lib/internal/string/CharCode._5 i32 (i32.const 53)) - (global $~lib/internal/string/CharCode._6 i32 (i32.const 54)) - (global $~lib/internal/string/CharCode._7 i32 (i32.const 55)) - (global $~lib/internal/string/CharCode._8 i32 (i32.const 56)) - (global $~lib/internal/string/CharCode._9 i32 (i32.const 57)) - (global $~lib/internal/string/CharCode.A i32 (i32.const 65)) - (global $~lib/internal/string/CharCode.B i32 (i32.const 66)) - (global $~lib/internal/string/CharCode.E i32 (i32.const 69)) - (global $~lib/internal/string/CharCode.N i32 (i32.const 78)) - (global $~lib/internal/string/CharCode.O i32 (i32.const 79)) - (global $~lib/internal/string/CharCode.X i32 (i32.const 88)) - (global $~lib/internal/string/CharCode.Z i32 (i32.const 90)) - (global $~lib/internal/string/CharCode.a i32 (i32.const 97)) - (global $~lib/internal/string/CharCode.b i32 (i32.const 98)) - (global $~lib/internal/string/CharCode.e i32 (i32.const 101)) - (global $~lib/internal/string/CharCode.n i32 (i32.const 110)) - (global $~lib/internal/string/CharCode.o i32 (i32.const 111)) - (global $~lib/internal/string/CharCode.x i32 (i32.const 120)) - (global $~lib/internal/string/CharCode.z i32 (i32.const 122)) - (global $std/string/c (mut i32) (i32.const 0)) - (global $std/string/a (mut i32) (i32.const 0)) - (global $std/string/b (mut i32) (i32.const 0)) - (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) - (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) - (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) - (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) - (global $Infinity f64 (f64.const inf)) - (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) - (global $~lib/builtins/f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284)) - (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) - (global $~lib/builtins/f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) - (global $HEAP_BASE i32 (i32.const 5648)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\10\00\00\00h\00i\00,\00 \00I\00\'\00m\00 \00a\00 \00s\00t\00r\00i\00n\00g\00") (data (i32.const 48) "\0d\00\00\00s\00t\00d\00/\00s\00t\00r\00i\00n\00g\00.\00t\00s\00") @@ -222,7 +155,75 @@ (data (i32.const 5520) "\0b\00\00\000\00.\000\000\000\000\003\005\006\008\009\00") (data (i32.const 5552) "\16\00\00\003\00.\004\000\002\008\002\003\004\006\006\003\008\005\002\008\008\006\00e\00+\003\008\00") (data (i32.const 5600) "\15\00\00\001\00.\001\009\002\000\009\002\008\009\005\005\000\007\008\001\002\005\00e\00-\007\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) + (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) + (global $~lib/internal/allocator/AL_MASK i32 (i32.const 7)) + (global $~lib/internal/allocator/MAX_SIZE_32 i32 (i32.const 1073741824)) + (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) + (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) + (global $~lib/internal/string/HEADER_SIZE i32 (i32.const 4)) + (global $~lib/internal/string/MAX_LENGTH i32 (i32.const 536870910)) + (global $~lib/internal/arraybuffer/HEADER_SIZE i32 (i32.const 8)) + (global $~lib/internal/arraybuffer/MAX_BLENGTH i32 (i32.const 1073741816)) + (global $~lib/internal/number/MAX_DOUBLE_LENGTH i32 (i32.const 28)) + (global $~lib/internal/number/_K (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp (mut i32) (i32.const 0)) + (global $~lib/internal/number/_frc_minus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_plus (mut i64) (i64.const 0)) + (global $~lib/internal/number/_frc_pow (mut i64) (i64.const 0)) + (global $~lib/internal/number/_exp_pow (mut i32) (i32.const 0)) + (global $std/string/str (mut i32) (i32.const 8)) + (global $std/string/nullStr (mut i32) (i32.const 0)) + (global $~argc (mut i32) (i32.const 0)) + (global $ASC_SHRINK_LEVEL i32 (i32.const 0)) + (global $~lib/builtins/i32.MAX_VALUE i32 (i32.const 2147483647)) + (global $NaN f64 (f64.const nan:0x8000000000000)) + (global $~lib/internal/string/CharCode.PLUS i32 (i32.const 43)) + (global $~lib/internal/string/CharCode.MINUS i32 (i32.const 45)) + (global $~lib/internal/string/CharCode.DOT i32 (i32.const 46)) + (global $~lib/internal/string/CharCode._0 i32 (i32.const 48)) + (global $~lib/internal/string/CharCode._1 i32 (i32.const 49)) + (global $~lib/internal/string/CharCode._2 i32 (i32.const 50)) + (global $~lib/internal/string/CharCode._3 i32 (i32.const 51)) + (global $~lib/internal/string/CharCode._4 i32 (i32.const 52)) + (global $~lib/internal/string/CharCode._5 i32 (i32.const 53)) + (global $~lib/internal/string/CharCode._6 i32 (i32.const 54)) + (global $~lib/internal/string/CharCode._7 i32 (i32.const 55)) + (global $~lib/internal/string/CharCode._8 i32 (i32.const 56)) + (global $~lib/internal/string/CharCode._9 i32 (i32.const 57)) + (global $~lib/internal/string/CharCode.A i32 (i32.const 65)) + (global $~lib/internal/string/CharCode.B i32 (i32.const 66)) + (global $~lib/internal/string/CharCode.E i32 (i32.const 69)) + (global $~lib/internal/string/CharCode.N i32 (i32.const 78)) + (global $~lib/internal/string/CharCode.O i32 (i32.const 79)) + (global $~lib/internal/string/CharCode.X i32 (i32.const 88)) + (global $~lib/internal/string/CharCode.Z i32 (i32.const 90)) + (global $~lib/internal/string/CharCode.a i32 (i32.const 97)) + (global $~lib/internal/string/CharCode.b i32 (i32.const 98)) + (global $~lib/internal/string/CharCode.e i32 (i32.const 101)) + (global $~lib/internal/string/CharCode.n i32 (i32.const 110)) + (global $~lib/internal/string/CharCode.o i32 (i32.const 111)) + (global $~lib/internal/string/CharCode.x i32 (i32.const 120)) + (global $~lib/internal/string/CharCode.z i32 (i32.const 122)) + (global $std/string/c (mut i32) (i32.const 0)) + (global $std/string/a (mut i32) (i32.const 0)) + (global $std/string/b (mut i32) (i32.const 0)) + (global $~lib/builtins/u32.MAX_VALUE i32 (i32.const -1)) + (global $~lib/builtins/u64.MAX_VALUE i64 (i64.const -1)) + (global $~lib/builtins/i64.MAX_VALUE i64 (i64.const 9223372036854775807)) + (global $~lib/builtins/i64.MIN_VALUE i64 (i64.const -9223372036854775808)) + (global $Infinity f64 (f64.const inf)) + (global $~lib/builtins/f64.EPSILON f64 (f64.const 2.220446049250313e-16)) + (global $~lib/builtins/f64.MAX_VALUE f64 (f64.const 1797693134862315708145274e284)) + (global $~lib/builtins/f32.MAX_VALUE f32 (f32.const 3402823466385288598117041e14)) + (global $~lib/builtins/f32.EPSILON f32 (f32.const 1.1920928955078125e-07)) + (global $HEAP_BASE i32 (i32.const 5648)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "getString" (func $std/string/getString)) (start $start) (func $~lib/string/String#charCodeAt (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index 944f09c5..7f376237 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -11,6 +11,13 @@ (type $FUNCSIG$vii (func (param i32 i32))) (type $FUNCSIG$iii (func (param i32 i32) (result i32))) (type $FUNCSIG$iiii (func (param i32 i32 i32) (result i32))) + (memory $0 1) + (data (i32.const 8) "\03\00\00\001\002\003") + (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") + (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -25,12 +32,8 @@ (global $std/symbol/key2 (mut i32) (i32.const 0)) (global $std/symbol/key3 (mut i32) (i32.const 0)) (global $std/symbol/key4 (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") - (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/symbol/Symbol (; 1 ;) (; has Stack IR ;) (type $FUNCSIG$i) (result i32) (local $0 i32) @@ -528,24 +531,31 @@ (get_local $2) ) (func $~lib/map/Map#clear (; 8 ;) (; has Stack IR ;) (type $iv) (param $0 i32) - (i32.store - (get_local $0) + (local $1 i32) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 16) (i32.const 0) ) ) + (i32.store + (get_local $0) + (get_local $1) + ) (i32.store offset=4 (get_local $0) (i32.const 3) ) - (i32.store offset=8 - (get_local $0) + (set_local $1 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.const 48) (i32.const 1) ) ) + (i32.store offset=8 + (get_local $0) + (get_local $1) + ) (i32.store offset=12 (get_local $0) (i32.const 4) @@ -809,27 +819,35 @@ (i32.const 0) ) (func $~lib/map/Map#has (; 14 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hashStr + (get_local $1) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hashStr - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) ) (func $~lib/map/Map#get (; 15 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hashStr + (get_local $1) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hashStr - (get_local $1) - ) + (get_local $2) ) ) (i32.load offset=4 @@ -847,7 +865,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -861,7 +879,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -899,7 +917,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -932,21 +950,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hashStr + (i32.load + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hashStr - (i32.load - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -956,7 +975,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -979,7 +998,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -987,7 +1006,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -1004,16 +1023,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hashStr + (get_local $1) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hashStr - (get_local $1) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -1253,7 +1273,7 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (set_local $4 + (set_local $5 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.shl (tee_local $2 @@ -1267,7 +1287,7 @@ (i32.const 0) ) ) - (set_local $5 + (set_local $6 (call $~lib/arraybuffer/ArrayBuffer#constructor (i32.mul (tee_local $7 @@ -1305,7 +1325,7 @@ ) (set_local $2 (i32.add - (get_local $5) + (get_local $6) (i32.const 8) ) ) @@ -1338,21 +1358,22 @@ (get_local $3) ) ) + (set_local $4 + (call $~lib/internal/hash/hash32 + (i32.load + (get_local $3) + ) + ) + ) (i32.store offset=8 (get_local $2) (i32.load offset=8 - (tee_local $6 + (tee_local $4 (i32.add - (get_local $4) + (get_local $5) (i32.shl (i32.and - (tee_local $6 - (call $~lib/internal/hash/hash32 - (i32.load - (get_local $3) - ) - ) - ) + (get_local $4) (get_local $1) ) (i32.const 2) @@ -1362,7 +1383,7 @@ ) ) (i32.store offset=8 - (get_local $6) + (get_local $4) (get_local $2) ) (set_local $2 @@ -1385,7 +1406,7 @@ ) (i32.store (get_local $0) - (get_local $4) + (get_local $5) ) (i32.store offset=4 (get_local $0) @@ -1393,7 +1414,7 @@ ) (i32.store offset=8 (get_local $0) - (get_local $5) + (get_local $6) ) (i32.store offset=12 (get_local $0) @@ -1410,16 +1431,17 @@ (local $3 i32) (local $4 i32) (local $5 i32) + (set_local $5 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (if (tee_local $3 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (tee_local $5 - (call $~lib/internal/hash/hash32 - (get_local $1) - ) - ) + (get_local $5) ) ) (i32.store offset=4 @@ -1595,27 +1617,35 @@ (get_local $0) ) (func $~lib/map/Map#has (; 23 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (i32.ne (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (get_local $1) - ) + (get_local $2) ) (i32.const 0) ) ) (func $~lib/map/Map#get (; 24 ;) (; has Stack IR ;) (type $iii) (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (set_local $2 + (call $~lib/internal/hash/hash32 + (get_local $1) + ) + ) (tee_local $0 (if (result i32) (tee_local $0 (call $~lib/map/Map#find (get_local $0) (get_local $1) - (call $~lib/internal/hash/hash32 - (get_local $1) - ) + (get_local $2) ) ) (i32.load offset=4 diff --git a/tests/compiler/std/symbol.untouched.wat b/tests/compiler/std/symbol.untouched.wat index e46c6371..f29f4e6f 100644 --- a/tests/compiler/std/symbol.untouched.wat +++ b/tests/compiler/std/symbol.untouched.wat @@ -8,6 +8,13 @@ (type $iiiiii (func (param i32 i32 i32 i32 i32) (result i32))) (type $iiv (func (param i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\03\00\00\001\002\003\00") + (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") + (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/internal/allocator/AL_BITS i32 (i32.const 3)) (global $~lib/internal/allocator/AL_SIZE i32 (i32.const 8)) @@ -39,14 +46,8 @@ (global $~lib/symbol/Symbol.hasInstance i32 (i32.const 1)) (global $~lib/symbol/Symbol.concatSpreadable i32 (i32.const 2)) (global $HEAP_BASE i32 (i32.const 164)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\03\00\00\001\002\003\00") - (data (i32.const 24) "\0d\00\00\00s\00t\00d\00/\00s\00y\00m\00b\00o\00l\00.\00t\00s\00") - (data (i32.const 56) "\13\00\00\00~\00l\00i\00b\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") - (data (i32.const 104) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $~lib/symbol/Symbol (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/std/trace.optimized.wat b/tests/compiler/std/trace.optimized.wat index 02720d03..1466f6c7 100644 --- a/tests/compiler/std/trace.optimized.wat +++ b/tests/compiler/std/trace.optimized.wat @@ -1,8 +1,6 @@ (module (type $iiFFFFFv (func (param i32 i32 f64 f64 f64 f64 f64))) (type $v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) - (global $~started (mut i32) (i32.const 0)) (memory $0 1) (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t") (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t") @@ -12,7 +10,12 @@ (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t") (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t") (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (global $~started (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $std/trace/main (; 1 ;) (; has Stack IR ;) (type $v) (if diff --git a/tests/compiler/std/trace.untouched.wat b/tests/compiler/std/trace.untouched.wat index cb994611..8ca02a2f 100644 --- a/tests/compiler/std/trace.untouched.wat +++ b/tests/compiler/std/trace.untouched.wat @@ -1,11 +1,6 @@ (module (type $iiFFFFFv (func (param i32 i32 f64 f64 f64 f64 f64))) (type $v (func)) - (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) - (global $~started (mut i32) (i32.const 0)) - (global $HEAP_BASE i32 (i32.const 212)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\0d\00\00\00z\00e\00r\00o\00_\00i\00m\00p\00l\00i\00c\00i\00t\00") (data (i32.const 40) "\0d\00\00\00z\00e\00r\00o\00_\00e\00x\00p\00l\00i\00c\00i\00t\00") @@ -15,7 +10,13 @@ (data (i32.const 144) "\08\00\00\00f\00o\00u\00r\00_\00i\00n\00t\00") (data (i32.const 168) "\08\00\00\00f\00i\00v\00e\00_\00i\00n\00t\00") (data (i32.const 192) "\08\00\00\00f\00i\00v\00e\00_\00d\00b\00l\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "trace" (func $~lib/env/trace (param i32 i32 f64 f64 f64 f64 f64))) + (global $~started (mut i32) (i32.const 0)) + (global $HEAP_BASE i32 (i32.const 212)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "main" (func $std/trace/main)) (func $std/trace/main (; 1 ;) (type $v) (if diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 4dfd75bf..aae43278 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -12,6 +12,12 @@ (type $FUNCSIG$i (func (result i32))) (type $FUNCSIG$ii (func (param i32) (result i32))) (type $FUNCSIG$v (func)) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") + (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") + (table 2 anyfunc) + (elem (i32.const 0) $null $~lib/internal/typedarray/TypedArray#sort|trampoline~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/allocator/arena/startOffset (mut i32) (i32.const 0)) (global $~lib/allocator/arena/offset (mut i32) (i32.const 0)) @@ -19,12 +25,6 @@ (global $std/typedarray/af64 (mut i32) (i32.const 0)) (global $~argc (mut i32) (i32.const 0)) (global $std/typedarray/clampedArr (mut i32) (i32.const 0)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $~lib/internal/typedarray/TypedArray#sort|trampoline~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s") - (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/std/typedarray.untouched.wat b/tests/compiler/std/typedarray.untouched.wat index 11f29640..3198d5f7 100644 --- a/tests/compiler/std/typedarray.untouched.wat +++ b/tests/compiler/std/typedarray.untouched.wat @@ -9,6 +9,12 @@ (type $FFi (func (param f64 f64) (result i32))) (type $iiF (func (param i32 i32) (result f64))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") + (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") + (table 2 anyfunc) + (elem (i32.const 0) $null $~lib/internal/typedarray/TypedArray#sort|trampoline~anonymous|1) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $~lib/typedarray/Int8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) (global $~lib/typedarray/Uint8Array.BYTES_PER_ELEMENT i32 (i32.const 1)) @@ -35,12 +41,6 @@ (global $std/typedarray/clampedArr (mut i32) (i32.const 0)) (global $std/typedarray/MAX_F64LENGTH i32 (i32.const 134217727)) (global $HEAP_BASE i32 (i32.const 172)) - (table 2 2 anyfunc) - (elem (i32.const 0) $null $~lib/internal/typedarray/TypedArray#sort|trampoline~anonymous|1) - (memory $0 1) - (data (i32.const 8) "\11\00\00\00s\00t\00d\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 48) "\1b\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00t\00y\00p\00e\00d\00a\00r\00r\00a\00y\00.\00t\00s\00") - (data (i32.const 112) "\1c\00\00\00~\00l\00i\00b\00/\00i\00n\00t\00e\00r\00n\00a\00l\00/\00a\00r\00r\00a\00y\00b\00u\00f\00f\00e\00r\00.\00t\00s\00") (export "memory" (memory $0)) (export "table" (table $0)) (start $start) diff --git a/tests/compiler/switch.optimized.wat b/tests/compiler/switch.optimized.wat index 6ee7aa5d..0330d840 100644 --- a/tests/compiler/switch.optimized.wat +++ b/tests/compiler/switch.optimized.wat @@ -3,10 +3,13 @@ (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) (type $FUNCSIG$i (func (result i32))) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/switch.untouched.wat b/tests/compiler/switch.untouched.wat index a4329dde..739f009d 100644 --- a/tests/compiler/switch.untouched.wat +++ b/tests/compiler/switch.untouched.wat @@ -2,13 +2,14 @@ (type $ii (func (param i32) (result i32))) (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) - (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) - (global $HEAP_BASE i32 (i32.const 32)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 1) (data (i32.const 8) "\t\00\00\00s\00w\00i\00t\00c\00h\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) + (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) + (global $HEAP_BASE i32 (i32.const 32)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $switch/doSwitch (; 1 ;) (type $ii) (param $0 i32) (result i32) (local $1 i32) diff --git a/tests/compiler/ternary.optimized.wat b/tests/compiler/ternary.optimized.wat index 46b8f34c..f4eb234b 100644 --- a/tests/compiler/ternary.optimized.wat +++ b/tests/compiler/ternary.optimized.wat @@ -1,8 +1,11 @@ (module (type $v (func)) - (global $ternary/a (mut i32) (i32.const 0)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $ternary/a (mut i32) (i32.const 0)) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (set_global $ternary/a diff --git a/tests/compiler/ternary.untouched.wat b/tests/compiler/ternary.untouched.wat index e56ae79f..57f87711 100644 --- a/tests/compiler/ternary.untouched.wat +++ b/tests/compiler/ternary.untouched.wat @@ -1,11 +1,12 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $ternary/a (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (drop diff --git a/tests/compiler/typealias.optimized.wat b/tests/compiler/typealias.optimized.wat index a1487511..5fff5c87 100644 --- a/tests/compiler/typealias.optimized.wat +++ b/tests/compiler/typealias.optimized.wat @@ -2,7 +2,10 @@ (type $ii (func (param i32) (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $start) (export "memory" (memory $0)) + (export "table" (table $0)) (export "alias" (func $typealias/alias)) (func $typealias/alias (; 0 ;) (; has Stack IR ;) (type $ii) (param $0 i32) (result i32) (get_local $0) diff --git a/tests/compiler/typealias.untouched.wat b/tests/compiler/typealias.untouched.wat index fee8f60f..dc63129d 100644 --- a/tests/compiler/typealias.untouched.wat +++ b/tests/compiler/typealias.untouched.wat @@ -1,11 +1,12 @@ (module (type $ii (func (param i32) (result i32))) (type $v (func)) - (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) + (global $HEAP_BASE i32 (i32.const 8)) (export "memory" (memory $0)) + (export "table" (table $0)) (export "alias" (func $typealias/alias)) (start $start) (func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32) diff --git a/tests/compiler/unary.optimized.wat b/tests/compiler/unary.optimized.wat index db0d1d60..145a019c 100644 --- a/tests/compiler/unary.optimized.wat +++ b/tests/compiler/unary.optimized.wat @@ -1,11 +1,14 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $unary/i (mut i32) (i32.const 0)) (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (; has Stack IR ;) (type $v) (local $0 i32) diff --git a/tests/compiler/unary.untouched.wat b/tests/compiler/unary.untouched.wat index bd4c6d4f..4c53a78e 100644 --- a/tests/compiler/unary.untouched.wat +++ b/tests/compiler/unary.untouched.wat @@ -1,14 +1,15 @@ (module (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $unary/i (mut i32) (i32.const 0)) (global $unary/I (mut i64) (i64.const 0)) (global $unary/f (mut f32) (f32.const 0)) (global $unary/F (mut f64) (f64.const 0)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 0 ;) (type $v) (local $0 i32) diff --git a/tests/compiler/void.optimized.wat b/tests/compiler/void.optimized.wat index d4eb19aa..c0c3d854 100644 --- a/tests/compiler/void.optimized.wat +++ b/tests/compiler/void.optimized.wat @@ -2,7 +2,10 @@ (type $i (func (result i32))) (type $v (func)) (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $void/anInt (; 0 ;) (; has Stack IR ;) (type $i) (result i32) (i32.const 2) diff --git a/tests/compiler/void.untouched.wat b/tests/compiler/void.untouched.wat index 753ecb84..424a287c 100644 --- a/tests/compiler/void.untouched.wat +++ b/tests/compiler/void.untouched.wat @@ -1,13 +1,14 @@ (module (type $i (func (result i32))) (type $v (func)) + (memory $0 0) + (table 1 anyfunc) + (elem (i32.const 0) $null) (global $void/u8Val1 (mut i32) (i32.const 1)) (global $void/u8Val2 (mut i32) (i32.const 255)) (global $HEAP_BASE i32 (i32.const 8)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 0) (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $void/anInt (; 0 ;) (type $i) (result i32) (i32.const 2) diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 565450bc..bef82890 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,13 +1,16 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (; has Stack IR ;) (type $v) (local $0 i32) diff --git a/tests/compiler/while.untouched.wat b/tests/compiler/while.untouched.wat index 3ce17686..478fbaac 100644 --- a/tests/compiler/while.untouched.wat +++ b/tests/compiler/while.untouched.wat @@ -1,16 +1,17 @@ (module (type $iiiiv (func (param i32 i32 i32 i32))) (type $v (func)) + (memory $0 1) + (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") + (table 1 anyfunc) + (elem (i32.const 0) $null) (import "env" "abort" (func $~lib/env/abort (param i32 i32 i32 i32))) (global $while/n (mut i32) (i32.const 10)) (global $while/m (mut i32) (i32.const 0)) (global $while/o (mut i32) (i32.const 0)) (global $HEAP_BASE i32 (i32.const 28)) - (table 1 1 anyfunc) - (elem (i32.const 0) $null) - (memory $0 1) - (data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00") (export "memory" (memory $0)) + (export "table" (table $0)) (start $start) (func $start (; 1 ;) (type $v) (local $0 i32) diff --git a/tests/parser/calls.ts b/tests/parser/calls.ts new file mode 100644 index 00000000..2e9b0d93 --- /dev/null +++ b/tests/parser/calls.ts @@ -0,0 +1,16 @@ +// Identifier +id(); + +// Call +id()(); + +// ElementAccess +arr[0](); +arr[0](1); + +// PropertyAccess +obj.a(); +obj.a(1); + +// Everything +id(a)[0](b)(c).a(d)(e)[1](f)(g); diff --git a/tests/parser/calls.ts.fixture.ts b/tests/parser/calls.ts.fixture.ts new file mode 100644 index 00000000..81e0e3d2 --- /dev/null +++ b/tests/parser/calls.ts.fixture.ts @@ -0,0 +1,7 @@ +id(); +id()(); +arr[0](); +arr[0](1); +obj.a(); +obj.a(1); +id(a)[0](b)(c).a(d)(e)[1](f)(g);