diff --git a/package-lock.json b/package-lock.json index e39fc37819..87113a8375 100644 --- a/package-lock.json +++ b/package-lock.json @@ -713,9 +713,9 @@ "optional": true }, "binaryen": { - "version": "98.0.0-nightly.20201030", - "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201030.tgz", - "integrity": "sha512-84r0ByOUNmydprOZ43adZyjvLQkPoYMTdzEZdxYC5tnD6cURv1BOj9Ue7eOin3huVCrqTqpaZ2M/wuTETyihNg==" + "version": "98.0.0-nightly.20201109", + "resolved": "https://registry.npmjs.org/binaryen/-/binaryen-98.0.0-nightly.20201109.tgz", + "integrity": "sha512-iRarAqdH5lMWlMBzrDuJgLYJR2g4QXk93iYE2zpr6gEZkb/jCgDpPUXdhuN11Ge1zZ/6By4DwA1mmifcx7FWaw==" }, "bluebird": { "version": "3.7.2", diff --git a/package.json b/package.json index ce408da6a3..0b96eed1a7 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "url": "https://github.com/AssemblyScript/assemblyscript/issues" }, "dependencies": { - "binaryen": "98.0.0-nightly.20201030", + "binaryen": "98.0.0-nightly.20201109", "long": "^4.0.0", "source-map-support": "^0.5.19", "ts-node": "^6.2.0" diff --git a/tests/compiler/assert-nonnull.optimized.wat b/tests/compiler/assert-nonnull.optimized.wat index 4fd2524864..e829adc8c0 100644 --- a/tests/compiler/assert-nonnull.optimized.wat +++ b/tests/compiler/assert-nonnull.optimized.wat @@ -76,10 +76,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.eqz if i32.const 1184 i32.const 1248 @@ -104,10 +103,9 @@ local.get $0 ) (func $~lib/array/Array#__get (param $0 i32) (result i32) - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.eqz if i32.const 1184 i32.const 1248 diff --git a/tests/compiler/builtins.optimized.wat b/tests/compiler/builtins.optimized.wat index 98bb4d10f8..1203504998 100644 --- a/tests/compiler/builtins.optimized.wat +++ b/tests/compiler/builtins.optimized.wat @@ -4,7 +4,6 @@ (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (import "env" "trace" (func $~lib/builtins/trace (param i32 i32 f64 f64 f64 f64 f64))) (memory $0 1) @@ -49,84 +48,10 @@ local.get $1 i32.add ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -156,10 +81,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/call-super.optimized.wat b/tests/compiler/call-super.optimized.wat index c02f429ea5..230c6c2fc8 100644 --- a/tests/compiler/call-super.optimized.wat +++ b/tests/compiler/call-super.optimized.wat @@ -67,9 +67,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/class-implements.optimized.wat b/tests/compiler/class-implements.optimized.wat index d3b1b7cc93..0a233d116e 100644 --- a/tests/compiler/class-implements.optimized.wat +++ b/tests/compiler/class-implements.optimized.wat @@ -49,9 +49,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/class-overloading.optimized.wat b/tests/compiler/class-overloading.optimized.wat index 52ec50b398..c30108abdd 100644 --- a/tests/compiler/class-overloading.optimized.wat +++ b/tests/compiler/class-overloading.optimized.wat @@ -4,7 +4,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1040) "\01\00\00\00\00\00\00\00\01") @@ -59,9 +58,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 @@ -115,84 +114,10 @@ call $~lib/rt/stub/__new end ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -222,10 +147,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/class.optimized.wat b/tests/compiler/class.optimized.wat index 37a8bba3ec..90081c45c6 100644 --- a/tests/compiler/class.optimized.wat +++ b/tests/compiler/class.optimized.wat @@ -90,9 +90,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/comma.optimized.wat b/tests/compiler/comma.optimized.wat index 586fb1e100..d162cda189 100644 --- a/tests/compiler/comma.optimized.wat +++ b/tests/compiler/comma.optimized.wat @@ -81,9 +81,9 @@ i32.const 2 global.set $comma/a loop $for-loop|0 - local.get $0 global.get $comma/a - i32.lt_s + local.get $0 + i32.gt_s if global.get $comma/a i32.const 1 diff --git a/tests/compiler/constructor.optimized.wat b/tests/compiler/constructor.optimized.wat index d6010eda56..cbd3c05ba4 100644 --- a/tests/compiler/constructor.optimized.wat +++ b/tests/compiler/constructor.optimized.wat @@ -64,9 +64,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/do.optimized.wat b/tests/compiler/do.optimized.wat index e532d11a61..ea304a6d3b 100644 --- a/tests/compiler/do.optimized.wat +++ b/tests/compiler/do.optimized.wat @@ -1,8 +1,8 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -16,89 +16,6 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $do/testNested - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 10 - local.set $0 - loop $do-continue|0 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - local.get $2 - i32.const 1 - i32.add - local.set $2 - loop $do-continue|1 - local.get $1 - i32.const 1 - i32.add - local.set $1 - local.get $0 - i32.const 1 - i32.sub - local.tee $0 - br_if $do-continue|1 - end - local.get $0 - if - i32.const 0 - i32.const 1056 - i32.const 39 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 40 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - br_if $do-continue|0 - end - local.get $0 - if - i32.const 0 - i32.const 1056 - i32.const 42 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 43 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 9 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 44 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $do/ran - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -646,85 +563,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -811,9 +649,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -924,14 +762,87 @@ end local.get $1 ) - (func $do/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -955,7 +866,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1248 i32.gt_u if @@ -1081,29 +996,98 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/testNested - global.get $do/ran - i32.eqz + i32.const 0 + local.set $0 + i32.const 10 + local.set $1 + loop $do-continue|01 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + local.get $2 + i32.const 1 + i32.add + local.set $2 + loop $do-continue|1 + local.get $0 + i32.const 1 + i32.add + local.set $0 + local.get $1 + i32.const 1 + i32.sub + local.tee $1 + br_if $do-continue|1 + end + local.get $1 + if + i32.const 0 + i32.const 1056 + i32.const 39 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 40 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $1 + br_if $do-continue|01 + end + local.get $1 if i32.const 0 i32.const 1056 - i32.const 49 - i32.const 1 + i32.const 42 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 43 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 9 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 44 + i32.const 3 call $~lib/builtins/abort unreachable end + i32.const 1 + global.set $do/ran i32.const 0 global.set $do/ran i32.const 0 local.set $0 - loop $do-continue|01 + loop $do-continue|012 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.ne - br_if $do-continue|01 + br_if $do-continue|012 end local.get $0 i32.const 10 @@ -1192,14 +1176,14 @@ i32.const 10 i32.ne if - loop $do-continue|1 + loop $do-continue|15 local.get $0 i32.const 1 i32.add local.tee $0 i32.const 10 i32.rem_s - br_if $do-continue|1 + br_if $do-continue|15 end br $do-continue|04 end @@ -1230,7 +1214,10 @@ global.set $do/ran i32.const 0 global.set $do/ran - call $do/Ref#constructor + i32.const 0 + local.set $2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 loop $do-continue|05 local.get $2 @@ -1248,7 +1235,8 @@ call $~lib/rt/pure/__release end else - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 local.get $1 call $~lib/rt/pure/__release @@ -1295,7 +1283,8 @@ global.set $do/ran i32.const 0 local.set $2 - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 loop $do-continue|06 block $do-break|0 @@ -1315,7 +1304,8 @@ local.set $1 br $do-break|0 end - call $do/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/pure/__release local.get $0 @@ -1434,8 +1424,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/empty.optimized.wat b/tests/compiler/empty.optimized.wat index 65aa2744e1..e9410e2dbf 100644 --- a/tests/compiler/empty.optimized.wat +++ b/tests/compiler/empty.optimized.wat @@ -61,9 +61,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -303,30 +303,24 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 2 local.get $0 - i32.lt_s + i32.const 2 + i32.gt_s select local.tee $1 - i32.const 2147483647 local.get $0 - i32.const 2147483647 local.get $0 - i32.lt_s - select - local.tee $2 local.get $1 - local.get $2 - i32.gt_s + i32.lt_s select i32.const 1 i32.shl local.tee $3 local.get $1 - local.get $2 + local.get $0 + local.get $0 local.get $1 - local.get $2 - i32.lt_s + i32.gt_s select i32.const 1 i32.shl diff --git a/tests/compiler/exports.optimized.wat b/tests/compiler/exports.optimized.wat index 24c1fc8467..f6bd5cb29e 100644 --- a/tests/compiler/exports.optimized.wat +++ b/tests/compiler/exports.optimized.wat @@ -96,9 +96,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/exportstar-rereexport.optimized.wat b/tests/compiler/exportstar-rereexport.optimized.wat index 81784c7bc2..d38d15a10b 100644 --- a/tests/compiler/exportstar-rereexport.optimized.wat +++ b/tests/compiler/exportstar-rereexport.optimized.wat @@ -76,9 +76,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/extends-baseaggregate.optimized.wat b/tests/compiler/extends-baseaggregate.optimized.wat index 7895d93b48..01b23f62d2 100644 --- a/tests/compiler/extends-baseaggregate.optimized.wat +++ b/tests/compiler/extends-baseaggregate.optimized.wat @@ -1,10 +1,10 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -578,10 +578,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -970,12 +970,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1344 @@ -1395,6 +1395,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1403,8 +1404,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1613,32 +1613,54 @@ call $~lib/rt/pure/decrement end ) - (func $~lib/array/Array#push (param $0 i32) + (func $start:extends-baseaggregate + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + (local $7 i32) + i32.const 6 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + i32.eqz + if + i32.const 4 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + f64.const 0 + f64.store + local.get $0 + f64.const 0 + f64.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=16 local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $3 i32.const 1180 i32.load - local.tee $5 + local.tee $6 i32.const 1 i32.add - local.tee $2 - local.set $0 - local.get $2 + local.tee $4 + local.set $1 + local.get $4 i32.const 1176 i32.load - local.tee $3 + local.tee $5 i32.const 2 i32.shr_u i32.gt_u if - local.get $0 + local.get $1 i32.const 268435455 i32.gt_u if @@ -1649,78 +1671,56 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $5 i32.const 1168 i32.load - local.tee $6 - local.get $0 + local.tee $7 + local.get $1 i32.const 2 i32.shl - local.tee $4 + local.tee $1 call $~lib/rt/pure/__renew - local.tee $0 + local.tee $2 i32.add - local.get $4 - local.get $3 + local.get $1 + local.get $5 i32.sub call $~lib/memory/memory.fill - local.get $0 - local.get $6 + local.get $2 + local.get $7 i32.ne if i32.const 1168 - local.get $0 + local.get $2 i32.store i32.const 1172 - local.get $0 + local.get $2 i32.store end i32.const 1176 - local.get $4 + local.get $1 i32.store end i32.const 1172 i32.load - local.get $5 + local.get $6 i32.const 2 i32.shl i32.add - local.get $1 + local.get $3 call $~lib/rt/pure/__retain i32.store i32.const 1180 - local.get $2 + local.get $4 i32.store - local.get $1 + local.get $3 call $~lib/rt/pure/__release - ) - (func $~start - (local $0 i32) - i32.const 6 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $0 - i32.eqz - if - i32.const 4 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - f64.const 0 - f64.store - local.get $0 - f64.const 0 - f64.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $0 - call $~lib/array/Array#push local.get $0 call $~lib/rt/pure/__release ) + (func $~start + call $start:extends-baseaggregate + ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1767,8 +1767,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1280 @@ -1931,8 +1930,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1280 @@ -1981,8 +1979,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2114,35 +2110,36 @@ unreachable end local.get $0 - i32.load offset=4 local.tee $2 + i32.load offset=4 + local.tee $3 local.get $0 i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $4 loop $while-continue|0 - local.get $2 local.get $3 + local.get $4 i32.lt_u if - local.get $2 + local.get $3 i32.load - local.tee $4 + local.tee $0 if - local.get $4 + local.get $0 local.get $1 call $~lib/rt/pure/__visit end - local.get $2 + local.get $3 i32.const 4 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $0 + local.get $2 i32.load local.get $1 call $~lib/rt/pure/__visit diff --git a/tests/compiler/field-initialization.optimized.wat b/tests/compiler/field-initialization.optimized.wat index 7afd43c6d0..1cc3558017 100644 --- a/tests/compiler/field-initialization.optimized.wat +++ b/tests/compiler/field-initialization.optimized.wat @@ -4,7 +4,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) ".\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00.\00\00\00f\00i\00e\00l\00d\00-\00i\00n\00i\00t\00i\00a\00l\00i\00z\00a\00t\00i\00o\00n\00.\00t\00s") @@ -77,9 +76,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -150,84 +149,10 @@ i32.store offset=4 local.get $0 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -257,10 +182,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/for.optimized.wat b/tests/compiler/for.optimized.wat index 2ca56ab28c..436839e991 100644 --- a/tests/compiler/for.optimized.wat +++ b/tests/compiler/for.optimized.wat @@ -1,8 +1,8 @@ (module + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -16,86 +16,6 @@ (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $for/testNestedContinue - (local $0 i32) - (local $1 i32) - (local $2 i32) - loop $for-loop|0 - local.get $0 - i32.const 10 - i32.lt_s - if - local.get $0 - i32.const 2 - i32.ge_s - if - i32.const 0 - local.set $1 - loop $for-loop|1 - local.get $1 - i32.const 10 - i32.lt_s - if - local.get $2 - i32.const 1 - i32.add - local.get $2 - local.get $0 - local.get $1 - i32.lt_s - select - local.set $2 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|1 - end - end - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $0 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 120 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 10 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 121 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 28 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 122 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - global.set $for/ran - ) (func $~lib/rt/tlsf/removeBlock (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -643,85 +563,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -808,9 +649,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -921,14 +762,87 @@ end local.get $1 ) - (func $for/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -952,7 +866,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1248 i32.gt_u if @@ -1216,22 +1134,91 @@ global.set $for/ran i32.const 0 global.set $for/ran - call $for/testNestedContinue - global.get $for/ran - i32.eqz + i32.const 0 + local.set $0 + loop $for-loop|06 + local.get $0 + i32.const 10 + i32.lt_s + if + local.get $0 + i32.const 2 + i32.ge_s + if + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 10 + i32.lt_s + if + local.get $2 + i32.const 1 + i32.add + local.get $2 + local.get $0 + local.get $1 + i32.lt_s + select + local.set $2 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|06 + end + end + local.get $0 + i32.const 10 + i32.ne if i32.const 0 i32.const 1056 - i32.const 127 - i32.const 1 + i32.const 120 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 10 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 121 + i32.const 3 call $~lib/builtins/abort unreachable end + local.get $2 + i32.const 28 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 122 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + global.set $for/ran i32.const 0 global.set $for/ran - call $for/Ref#constructor + i32.const 0 + local.set $2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $for-loop|06 + loop $for-loop|07 local.get $0 if local.get $2 @@ -1249,14 +1236,15 @@ call $~lib/rt/pure/__release end else - call $for/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 local.get $0 call $~lib/rt/pure/__release end local.get $1 local.set $0 - br $for-loop|06 + br $for-loop|07 end end local.get $2 @@ -1297,16 +1285,19 @@ global.set $for/ran i32.const 0 local.set $2 - call $for/Ref#constructor - call $for/Ref#constructor - local.set $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 call $~lib/rt/pure/__release - loop $for-loop|07 + loop $for-loop|08 block $for-break0 - call $for/Ref#constructor - local.tee $0 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $1 call $~lib/rt/pure/__release - local.get $0 + local.get $1 if local.get $2 i32.const 1 @@ -1315,20 +1306,21 @@ i32.const 10 i32.eq if - local.get $1 + local.get $0 if - local.get $1 + local.get $0 call $~lib/rt/pure/__release end i32.const 0 - local.set $1 + local.set $0 br $for-break0 end - call $for/Ref#constructor - local.get $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.get $0 call $~lib/rt/pure/__release - local.set $1 - br $for-loop|07 + local.set $0 + br $for-loop|08 end end end @@ -1343,7 +1335,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 if i32.const 0 i32.const 1056 @@ -1354,7 +1346,7 @@ end i32.const 1 global.set $for/ran - local.get $1 + local.get $0 call $~lib/rt/pure/__release global.get $for/ran i32.eqz @@ -1444,8 +1436,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/function-call.optimized.wat b/tests/compiler/function-call.optimized.wat index 6b3b185d26..17f2ed8243 100644 --- a/tests/compiler/function-call.optimized.wat +++ b/tests/compiler/function-call.optimized.wat @@ -93,7 +93,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1388 memory.size local.tee $1 i32.const 16 @@ -103,7 +102,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1388 + i32.lt_u if local.get $1 i32.const 66923 @@ -114,9 +114,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/function-expression.optimized.wat b/tests/compiler/function-expression.optimized.wat index 585bf34ed0..d0dc6ad3d3 100644 --- a/tests/compiler/function-expression.optimized.wat +++ b/tests/compiler/function-expression.optimized.wat @@ -231,7 +231,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1676 memory.size local.tee $1 i32.const 16 @@ -241,7 +240,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1676 + i32.lt_u if local.get $1 i32.const 67211 @@ -252,9 +252,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/getter-call.optimized.wat b/tests/compiler/getter-call.optimized.wat index b61037a143..ff9abc4d35 100644 --- a/tests/compiler/getter-call.optimized.wat +++ b/tests/compiler/getter-call.optimized.wat @@ -48,9 +48,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/heap.optimized.wat b/tests/compiler/heap.optimized.wat index 95b3131144..a99e3ad5a5 100644 --- a/tests/compiler/heap.optimized.wat +++ b/tests/compiler/heap.optimized.wat @@ -570,10 +570,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -962,12 +962,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1056 @@ -1294,6 +1294,7 @@ i32.const 1 i32.and if + local.get $4 local.get $3 i32.const 4 i32.add @@ -1302,8 +1303,7 @@ i32.and i32.add local.tee $3 - local.get $4 - i32.ge_u + i32.le_u if local.get $2 local.get $6 diff --git a/tests/compiler/implicit-getter-setter.optimized.wat b/tests/compiler/implicit-getter-setter.optimized.wat index 47ec7054ff..fa01df3f53 100644 --- a/tests/compiler/implicit-getter-setter.optimized.wat +++ b/tests/compiler/implicit-getter-setter.optimized.wat @@ -581,10 +581,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -973,12 +973,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1360,6 +1360,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1368,8 +1369,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1600,8 +1600,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/infer-array.optimized.wat b/tests/compiler/infer-array.optimized.wat index ddf4887d25..102a793fd7 100644 --- a/tests/compiler/infer-array.optimized.wat +++ b/tests/compiler/infer-array.optimized.wat @@ -99,9 +99,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -367,18 +367,20 @@ i32.const 1200 call $~lib/rt/__newArray drop + i32.const 2 + i32.const 2 + i32.const 5 + i32.const 1248 + call $~lib/rt/__newArray + local.tee $0 + local.set $1 block $folding-inner0 - i32.const 1 - i32.const 2 - i32.const 2 - i32.const 5 - i32.const 1248 - call $~lib/rt/__newArray - local.tee $0 + local.get $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u br_if $folding-inner0 - local.get $0 + local.get $1 i32.load offset=4 i32.load offset=4 i32.const -1 @@ -397,17 +399,17 @@ i32.const 1328 call $~lib/rt/__newArray drop - i32.const 1 i32.const 3 i32.const 2 i32.const 6 i32.const 1376 call $~lib/rt/__newArray local.tee $0 + local.get $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u br_if $folding-inner0 - local.get $0 i32.load offset=4 f32.load offset=4 drop diff --git a/tests/compiler/inlining.optimized.wat b/tests/compiler/inlining.optimized.wat index b40c8a157a..e3ce174f60 100644 --- a/tests/compiler/inlining.optimized.wat +++ b/tests/compiler/inlining.optimized.wat @@ -1,6 +1,6 @@ (module - (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) @@ -79,9 +79,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -119,8 +119,24 @@ i32.const 16 i32.add ) - (func $inlining/test_ctor + (func $~start (local $0 i32) + i32.const 2 + i32.const 1104 + i32.load + call_indirect (type $i32_=>_i32) + i32.const 2 + i32.ne + if + i32.const 0 + i32.const 1056 + i32.const 68 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1116 + global.set $~lib/rt/stub/offset i32.const 16 i32.const 5 call $~lib/rt/stub/__new @@ -199,23 +215,4 @@ unreachable end ) - (func $~start - i32.const 2 - i32.const 1104 - i32.load - call_indirect (type $i32_=>_i32) - i32.const 2 - i32.ne - if - i32.const 0 - i32.const 1056 - i32.const 68 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1116 - global.set $~lib/rt/stub/offset - call $inlining/test_ctor - ) ) diff --git a/tests/compiler/instanceof-class.optimized.wat b/tests/compiler/instanceof-class.optimized.wat index 55c8f44eb1..8fc4d542a4 100644 --- a/tests/compiler/instanceof-class.optimized.wat +++ b/tests/compiler/instanceof-class.optimized.wat @@ -47,9 +47,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/issues/1095.optimized.wat b/tests/compiler/issues/1095.optimized.wat index 283e11e2ab..8bde10b084 100644 --- a/tests/compiler/issues/1095.optimized.wat +++ b/tests/compiler/issues/1095.optimized.wat @@ -1,10 +1,11 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "(\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00(\00\00\00a\00l\00l\00o\00c\00a\00t\00i\00o\00n\00 \00t\00o\00o\00 \00l\00a\00r\00g\00e") @@ -563,85 +564,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1376 - i32.const 0 - i32.store - i32.const 2944 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1376 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1376 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1376 - i32.const 2948 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1376 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -728,9 +650,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -841,6 +763,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1376 + i32.const 0 + i32.store + i32.const 2944 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1376 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1376 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1376 + i32.const 2948 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1376 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 4 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -906,44 +933,18 @@ (local $1 i32) (local $2 i32) (local $3 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 4 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add + call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1248 i32.store - local.get $1 + local.get $2 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 local.set $3 - local.get $2 + local.get $0 i32.load - local.tee $0 + local.tee $1 i32.eqz if i32.const 1280 @@ -953,24 +954,24 @@ call $~lib/builtins/abort unreachable end + local.get $1 local.get $0 - local.get $2 i32.load - local.tee $2 + local.tee $0 i32.ne if - local.get $0 + local.get $1 call $~lib/rt/pure/__retain - local.set $0 - local.get $2 + local.set $1 + local.get $0 call $~lib/rt/pure/__release end local.get $3 - local.get $0 + local.get $1 i32.store local.get $3 call $~lib/rt/pure/__release - local.get $1 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1047,8 +1048,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/issues/1225.optimized.wat b/tests/compiler/issues/1225.optimized.wat index 899a6925eb..46f0718225 100644 --- a/tests/compiler/issues/1225.optimized.wat +++ b/tests/compiler/issues/1225.optimized.wat @@ -1,8 +1,8 @@ (module - (type $none_=>_none (func)) - (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_i32 (func (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -565,85 +565,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1280 - i32.const 0 - i32.store - i32.const 2848 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1280 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1280 - i32.const 2852 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1280 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -730,9 +651,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -843,45 +764,124 @@ end local.get $1 ) - (func $issues/1225/normal (result i32) - global.get $issues/1225/x - i32.load - ) - (func $issues/1225/viaThis (result i32) - global.get $issues/1225/x - i32.load offset=4 - ) - (func $start:issues/1225 + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1280 + i32.const 0 + i32.store + i32.const 2848 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1280 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1280 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1280 + i32.const 2852 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1280 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add - local.tee $0 + local.tee $1 i32.const 4 i32.sub - local.tee $1 + local.tee $0 i32.const 0 i32.store offset=4 - local.get $1 + local.get $0 i32.const 0 i32.store offset=8 - local.get $1 + local.get $0 i32.const 3 i32.store offset=12 - local.get $1 + local.get $0 i32.const 12 i32.store offset=16 - local.get $0 + local.get $1 i32.const 16 i32.add + ) + (func $issues/1225/normal (result i32) + global.get $issues/1225/x + i32.load + ) + (func $issues/1225/viaThis (result i32) + global.get $issues/1225/x + i32.load offset=4 + ) + (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/pure/__new local.tee $0 i32.const 1276 i32.gt_u @@ -889,12 +889,12 @@ local.get $0 i32.const 20 i32.sub - local.tee $2 - i32.load offset=4 local.tee $1 + i32.load offset=4 + local.tee $2 i32.const -268435456 i32.and - local.get $1 + local.get $2 i32.const 1 i32.add i32.const -268435456 @@ -908,12 +908,12 @@ call $~lib/builtins/abort unreachable end - local.get $2 local.get $1 + local.get $2 i32.const 1 i32.add i32.store offset=4 - local.get $2 + local.get $1 i32.load i32.const 1 i32.and @@ -984,9 +984,6 @@ i32.const 0 global.set $issues/1225/x ) - (func $~start - call $start:issues/1225 - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1061,8 +1058,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/logical.optimized.wat b/tests/compiler/logical.optimized.wat index 0f72f7d26b..09426d4f58 100644 --- a/tests/compiler/logical.optimized.wat +++ b/tests/compiler/logical.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -727,9 +648,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $logical/Obj#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1264 @@ -936,8 +930,10 @@ (local $0 i32) (local $1 i32) (local $2 i32) - call $logical/Obj#constructor - local.tee $1 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + local.get $0 call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/pure/__release @@ -951,12 +947,15 @@ call $~lib/builtins/abort unreachable end - call $logical/Obj#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 + local.set $2 + local.get $0 call $~lib/rt/pure/__retain - local.tee $2 + local.tee $0 call $~lib/rt/pure/__release - local.get $2 + local.get $0 i32.eqz if i32.const 0 @@ -966,9 +965,8 @@ call $~lib/builtins/abort unreachable end - local.get $1 call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1045,8 +1043,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168 diff --git a/tests/compiler/managed-cast.optimized.wat b/tests/compiler/managed-cast.optimized.wat index f698376a1e..94655ddbd1 100644 --- a/tests/compiler/managed-cast.optimized.wat +++ b/tests/compiler/managed-cast.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -565,85 +565,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1472 - i32.const 0 - i32.store - i32.const 3040 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1472 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1472 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1472 - i32.const 3044 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1472 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -730,9 +651,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -849,7 +770,81 @@ global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $2 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $2 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1472 + i32.const 0 + i32.store + i32.const 3040 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $1 + i32.const 23 + i32.lt_u + if + local.get $1 + i32.const 2 + i32.shl + i32.const 1472 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $2 + loop $for-loop|1 + local.get $2 + i32.const 16 + i32.lt_u + if + local.get $2 + local.get $1 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1472 + i32.add + i32.const 0 + i32.store offset=96 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|1 + end + end + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|0 + end + end + i32.const 1472 + i32.const 3044 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1472 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -1001,7 +996,7 @@ (local $9 i32) call $managed-cast/Cat#constructor call $managed-cast/Cat#constructor - local.tee $5 + local.tee $3 call $~lib/rt/pure/__retain local.tee $0 i32.eqz @@ -1016,13 +1011,13 @@ local.get $0 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $6 + local.tee $4 call $managed-cast/testDowncastToNullable call $managed-cast/Cat#constructor - local.tee $7 + local.tee $5 call $managed-cast/testDowncastToNullable call $managed-cast/Cat#constructor - local.tee $8 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 call $~lib/rt/__instanceof @@ -1038,10 +1033,10 @@ local.get $0 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $9 + local.tee $7 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 i32.eqz if i32.const 1248 @@ -1061,13 +1056,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $2 + local.tee $8 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/rt/__instanceof i32.eqz if @@ -1079,14 +1074,14 @@ unreachable end call $~lib/rt/pure/__retain - local.get $0 + local.get $1 call $~lib/rt/pure/__release call $~lib/rt/pure/__release call $managed-cast/Cat#constructor - local.tee $1 + local.tee $9 call $~lib/rt/pure/__retain - local.tee $0 - local.get $0 + local.tee $1 + local.get $1 call $~lib/rt/__instanceof i32.eqz if @@ -1098,9 +1093,13 @@ unreachable end call $~lib/rt/pure/__retain - local.get $0 + local.get $1 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release + local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -1112,10 +1111,6 @@ call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) (func $~start call $start:managed-cast @@ -1194,8 +1189,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/new.optimized.wat b/tests/compiler/new.optimized.wat index fc5c605759..551af3de28 100644 --- a/tests/compiler/new.optimized.wat +++ b/tests/compiler/new.optimized.wat @@ -41,9 +41,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/number.optimized.wat b/tests/compiler/number.optimized.wat index 3377ad615e..69d2b922c2 100644 --- a/tests/compiler/number.optimized.wat +++ b/tests/compiler/number.optimized.wat @@ -7,7 +7,6 @@ (type $f64_=>_i32 (func (param f64) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_=>_i32 (func (param i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -139,9 +138,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 @@ -180,16 +179,7 @@ i32.add ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -198,11 +188,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -210,19 +205,24 @@ (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - if (result i32) + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 + i32.eqz if - i32.const 0 - local.get $0 - i32.sub + i32.const 1248 local.set $0 + br $__inlined_func$~lib/util/number/itoa32 end + i32.const 0 local.get $0 + i32.sub + local.get $0 + local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + select + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add @@ -230,99 +230,23 @@ i32.const 1 i32.shl call $~lib/rt/stub/__new - local.tee $2 - local.get $0 + local.tee $0 + local.get $2 local.get $3 call $~lib/util/number/utoa_dec_simple local.get $1 if - local.get $2 + local.get $0 i32.const 45 i32.store16 end - local.get $2 - else - i32.const 1248 end - ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -352,10 +276,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -590,11 +586,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -664,12 +660,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -709,16 +705,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1010,9 +1006,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 diff --git a/tests/compiler/object-literal.optimized.wat b/tests/compiler/object-literal.optimized.wat index 3f55a21c6d..df0052b0fd 100644 --- a/tests/compiler/object-literal.optimized.wat +++ b/tests/compiler/object-literal.optimized.wat @@ -572,10 +572,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -777,86 +777,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1232 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -960,12 +884,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1232 @@ -977,10 +901,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1232 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) @@ -1424,80 +1417,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $object-literal/testUnmanaged (param $0 i32) - (local $1 i32) - (local $2 i32) - local.get $0 - i32.load - i32.const 123 - i32.ne - if - i32.const 0 - i32.const 1296 - i32.const 27 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 1392 - call $~lib/string/String.__eq - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 28 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - call $~lib/rt/pure/__release - local.get $0 - i32.const 1496 - i32.ge_u - if - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 4 - i32.sub - local.set $1 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $1 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1232 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - ) (func $object-literal/testOmittedTypes (param $0 i32) local.get $0 call $~lib/rt/pure/__retain @@ -1858,16 +1777,16 @@ i32.const 1 i32.shr_u local.tee $1 - i32.const 0 local.get $1 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $2 i32.const 5 local.get $1 - i32.const 5 local.get $1 - i32.lt_s + i32.const 5 + i32.gt_s select local.tee $3 local.get $2 @@ -1916,7 +1835,75 @@ end i32.store offset=4 local.get $0 - call $object-literal/testUnmanaged + i32.load + i32.const 123 + i32.ne + if + i32.const 0 + i32.const 1296 + i32.const 27 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + i32.const 1392 + call $~lib/string/String.__eq + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 28 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=4 + call $~lib/rt/pure/__release + local.get $0 + i32.const 1496 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $0 + i32.const 4 + i32.sub + local.set $1 + local.get $0 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $0 + select + if (result i32) + local.get $1 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1232 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $1 + call $~lib/rt/tlsf/freeBlock + end i32.const 65 i32.const 4 call $~lib/rt/pure/__new @@ -2162,10 +2149,95 @@ i32.const 1 i32.eq if - local.get $0 - i32.const 20 - i32.add - call $~lib/rt/__visit_members + block $__inlined_func$~lib/rt/__visit_members + block $switch$1$default + block $switch$1$case$8 + block $switch$1$case$5 + block $switch$1$case$4 + local.get $0 + i32.const 12 + i32.add + i32.load + br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $__inlined_func$~lib/rt/__visit_members $switch$1$case$5 $switch$1$case$8 $switch$1$default + end + local.get $0 + i32.load offset=20 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $0 + i32.load offset=24 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + local.get $0 + i32.load offset=20 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=24 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=28 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=32 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=36 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=40 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=44 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + local.get $0 + i32.load offset=48 + local.tee $1 + if + local.get $1 + call $~lib/rt/pure/__visit + end + br $__inlined_func$~lib/rt/__visit_members + end + unreachable + end local.get $2 i32.const -2147483648 i32.and @@ -2182,8 +2254,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168 @@ -2215,97 +2286,4 @@ i32.sub call $~lib/rt/pure/decrement ) - (func $~lib/rt/__visit_members (param $0 i32) - (local $1 i32) - block $switch$1$default - block $switch$1$case$8 - block $switch$1$case$5 - block $switch$1$case$4 - block $switch$1$case$2 - local.get $0 - i32.const 8 - i32.sub - i32.load - br_table $switch$1$case$2 $switch$1$case$2 $switch$1$case$4 $switch$1$case$5 $switch$1$case$2 $switch$1$case$5 $switch$1$case$8 $switch$1$default - end - return - end - local.get $0 - i32.load - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - local.get $0 - i32.load offset=4 - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - local.get $0 - i32.load - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=4 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=8 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=12 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=16 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=20 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=24 - local.tee $1 - if - local.get $1 - call $~lib/rt/pure/__visit - end - local.get $0 - i32.load offset=28 - local.tee $0 - if - local.get $0 - call $~lib/rt/pure/__visit - end - return - end - unreachable - ) ) diff --git a/tests/compiler/optional-typeparameters.optimized.wat b/tests/compiler/optional-typeparameters.optimized.wat index 96dc54cba7..b62c0907e3 100644 --- a/tests/compiler/optional-typeparameters.optimized.wat +++ b/tests/compiler/optional-typeparameters.optimized.wat @@ -41,9 +41,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rc/local-init.optimized.wat b/tests/compiler/rc/local-init.optimized.wat index 92d4970379..31270e5fa5 100644 --- a/tests/compiler/rc/local-init.optimized.wat +++ b/tests/compiler/rc/local-init.optimized.wat @@ -1,10 +1,11 @@ (module - (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $none_=>_i32 (func (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1040) "\01\00\00\00\00\00\00\00\01") @@ -561,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1248 - i32.const 0 - i32.store - i32.const 2816 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1248 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1248 - i32.const 2820 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1248 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -726,9 +648,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -839,14 +761,87 @@ end local.get $1 ) - (func $start:rc/local-init + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1248 + i32.const 0 + i32.store + i32.const 2816 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1248 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1248 + i32.const 2820 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1248 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -870,6 +865,12 @@ local.get $1 i32.const 16 i32.add + ) + (func $~start + (local $0 i32) + (local $1 i32) + (local $2 i32) + call $~lib/rt/pure/__new local.tee $0 i32.const 1248 i32.gt_u @@ -924,9 +925,6 @@ call $~lib/rt/pure/decrement end ) - (func $~start - call $start:rc/local-init - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1001,8 +999,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1152 diff --git a/tests/compiler/rc/logical-and-mismatch.optimized.wat b/tests/compiler/rc/logical-and-mismatch.optimized.wat index d47eea9c94..1d6b988c9a 100644 --- a/tests/compiler/rc/logical-and-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-and-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -727,9 +648,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $rc/logical-and-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1216 @@ -934,9 +928,11 @@ ) (func $~start (local $0 i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/logical-and-mismatch/gloRef - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 @@ -950,31 +946,26 @@ global.get $rc/logical-and-mismatch/gloRef local.tee $0 if (result i32) - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else local.get $0 call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 call $~lib/rt/pure/__release - call $rc/logical-and-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else local.get $0 end call $~lib/rt/pure/__release global.get $rc/logical-and-mismatch/gloRef - local.tee $0 - if (result i32) - global.get $rc/logical-and-mismatch/gloRef - else - local.get $0 - end - drop - global.get $rc/logical-and-mismatch/gloRef call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1051,8 +1042,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/logical-or-mismatch.optimized.wat b/tests/compiler/rc/logical-or-mismatch.optimized.wat index bd85492b5e..c236ff0479 100644 --- a/tests/compiler/rc/logical-or-mismatch.optimized.wat +++ b/tests/compiler/rc/logical-or-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -562,85 +562,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -727,9 +648,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -840,6 +761,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -889,38 +915,6 @@ end local.get $0 ) - (func $rc/logical-or-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 i32.const 1216 @@ -934,9 +928,11 @@ ) (func $~start (local $0 i32) - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/logical-or-mismatch/gloRef - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 @@ -953,28 +949,23 @@ local.get $0 call $~lib/rt/pure/__retain else - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $0 if (result i32) local.get $0 else local.get $0 call $~lib/rt/pure/__release - call $rc/logical-or-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end call $~lib/rt/pure/__release global.get $rc/logical-or-mismatch/gloRef - local.tee $0 - if (result i32) - local.get $0 - else - global.get $rc/logical-or-mismatch/gloRef - end - drop - global.get $rc/logical-or-mismatch/gloRef call $~lib/rt/pure/__release ) (func $~lib/rt/pure/decrement (param $0 i32) @@ -1051,8 +1042,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/optimize.optimized.wat b/tests/compiler/rc/optimize.optimized.wat index 8eced93628..d9c19f186b 100644 --- a/tests/compiler/rc/optimize.optimized.wat +++ b/tests/compiler/rc/optimize.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -650,85 +650,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -858,86 +779,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1184 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1041,12 +886,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1058,10 +903,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1184 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1078,17 +992,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1347,8 +1333,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1056 diff --git a/tests/compiler/rc/rereturn.optimized.wat b/tests/compiler/rc/rereturn.optimized.wat index ac659eb7fc..ce740b6d1e 100644 --- a/tests/compiler/rc/rereturn.optimized.wat +++ b/tests/compiler/rc/rereturn.optimized.wat @@ -572,10 +572,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -964,12 +964,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1351,6 +1351,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1359,8 +1360,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1534,8 +1534,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rc/ternary-mismatch.optimized.wat b/tests/compiler/rc/ternary-mismatch.optimized.wat index bf65446550..3baa70507c 100644 --- a/tests/compiler/rc/ternary-mismatch.optimized.wat +++ b/tests/compiler/rc/ternary-mismatch.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -564,85 +564,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1216 - i32.const 0 - i32.store - i32.const 2784 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1216 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1216 - i32.const 2788 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1216 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -729,9 +650,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -842,6 +763,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1216 + i32.const 0 + i32.store + i32.const 2784 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1216 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1216 + i32.const 2788 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1216 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -891,76 +917,45 @@ end local.get $0 ) - (func $rc/ternary-mismatch/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $rc/ternary-mismatch/test1 (param $0 i32) (result i32) local.get $0 if (result i32) - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain else global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain end ) - (func $~lib/rt/pure/__release (param $0 i32) - local.get $0 - i32.const 1216 - i32.gt_u - if - local.get $0 - i32.const 20 - i32.sub - call $~lib/rt/pure/decrement - end - ) (func $rc/ternary-mismatch/test2 (param $0 i32) (result i32) local.get $0 if (result i32) global.get $rc/ternary-mismatch/gloRef call $~lib/rt/pure/__retain else - call $rc/ternary-mismatch/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain end ) (func $~start - call $rc/ternary-mismatch/Ref#constructor + (local $0 i32) + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $rc/ternary-mismatch/gloRef - call $rc/ternary-mismatch/Ref#constructor - call $~lib/rt/pure/__release - call $rc/ternary-mismatch/Ref#constructor - call $~lib/rt/pure/__release + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop global.get $rc/ternary-mismatch/gloRef - call $~lib/rt/pure/__release + local.tee $0 + i32.const 1216 + i32.gt_u + if + local.get $0 + i32.const 20 + i32.sub + call $~lib/rt/pure/decrement + end ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) @@ -1036,8 +1031,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/reexport.optimized.wat b/tests/compiler/reexport.optimized.wat index d3e16366c3..3460d6f7d5 100644 --- a/tests/compiler/reexport.optimized.wat +++ b/tests/compiler/reexport.optimized.wat @@ -130,9 +130,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rereexport.optimized.wat b/tests/compiler/rereexport.optimized.wat index 81784c7bc2..d38d15a10b 100644 --- a/tests/compiler/rereexport.optimized.wat +++ b/tests/compiler/rereexport.optimized.wat @@ -76,9 +76,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-access.optimized.wat b/tests/compiler/resolve-access.optimized.wat index 62e4f2b896..cf7babed95 100644 --- a/tests/compiler/resolve-access.optimized.wat +++ b/tests/compiler/resolve-access.optimized.wat @@ -82,9 +82,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -336,16 +336,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -354,11 +345,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -366,7 +362,6 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) local.get $0 i64.eqz if @@ -443,15 +438,6 @@ local.tee $3 local.set $2 loop $do-continue|0 - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $4 - local.get $0 - i64.const 10 - i64.div_u - local.set $0 local.get $2 local.get $1 i32.const 1 @@ -460,11 +446,17 @@ i32.const 1 i32.shl i32.add - local.get $4 + local.get $0 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $0 + i64.const 10 + i64.div_u + local.tee $0 i64.const 0 i64.ne br_if $do-continue|0 @@ -496,10 +488,9 @@ local.get $0 i32.const 1 i32.store offset=12 - i32.const 0 local.get $0 i32.load offset=12 - i32.ge_u + i32.eqz if i32.const 1088 i32.const 1152 diff --git a/tests/compiler/resolve-binary.optimized.wat b/tests/compiler/resolve-binary.optimized.wat index 3466deb879..6d80118c04 100644 --- a/tests/compiler/resolve-binary.optimized.wat +++ b/tests/compiler/resolve-binary.optimized.wat @@ -5,7 +5,6 @@ (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_=>_i32 (func (param i64 i32 i64 i32 i64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) @@ -51,84 +50,10 @@ (global $resolve-binary/bar2 (mut i32) (i32.const 0)) (export "memory" (memory $0)) (start $~start) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -158,10 +83,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -268,9 +265,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -309,16 +306,7 @@ i32.add ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -327,11 +315,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -339,19 +332,24 @@ (local $1 i32) (local $2 i32) (local $3 i32) - local.get $0 - if (result i32) + block $__inlined_func$~lib/util/number/itoa32 local.get $0 - i32.const 31 - i32.shr_u - local.tee $1 + i32.eqz if - i32.const 0 - local.get $0 - i32.sub + i32.const 1408 local.set $0 + br $__inlined_func$~lib/util/number/itoa32 end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 + i32.const 31 + i32.shr_u + local.tee $1 + select + local.tee $2 call $~lib/util/number/decimalCount32 local.get $1 i32.add @@ -360,20 +358,18 @@ i32.shl i32.const 1 call $~lib/rt/stub/__new - local.tee $2 - local.get $0 + local.tee $0 + local.get $2 local.get $3 call $~lib/util/number/utoa_dec_simple local.get $1 if - local.get $2 + local.get $0 i32.const 45 i32.store16 end - local.get $2 - else - i32.const 1408 end + local.get $0 ) (func $~lib/util/number/genDigits (param $0 i64) (param $1 i32) (param $2 i64) (param $3 i32) (param $4 i64) (result i32) (local $5 i32) @@ -604,11 +600,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -678,12 +674,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -723,16 +719,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1024,9 +1020,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $2 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 diff --git a/tests/compiler/resolve-elementaccess.optimized.wat b/tests/compiler/resolve-elementaccess.optimized.wat index 8e1d40fe17..76609a45a1 100644 --- a/tests/compiler/resolve-elementaccess.optimized.wat +++ b/tests/compiler/resolve-elementaccess.optimized.wat @@ -3,10 +3,10 @@ (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f32_=>_none (func (param i32 i32 f32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i64_i32_i64_i32_i64_i32_=>_i32 (func (param i64 i32 i64 i32 i64 i32) (result i32))) (type $f32_=>_i32 (func (param f32) (result i32))) (type $f64_=>_i32 (func (param f64) (result i32))) @@ -105,9 +105,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -322,11 +322,11 @@ local.get $0 i32.const 0 i32.store offset=8 - i32.const 2 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 2 + i32.lt_u if i32.const 1056 i32.const 1104 @@ -675,11 +675,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -749,12 +749,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -794,16 +794,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -1001,16 +1001,7 @@ end ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -1019,11 +1010,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -1121,9 +1117,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -1604,84 +1600,10 @@ end local.get $2 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -1711,10 +1633,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/resolve-function-expression.optimized.wat b/tests/compiler/resolve-function-expression.optimized.wat index b57e50e03f..adce664687 100644 --- a/tests/compiler/resolve-function-expression.optimized.wat +++ b/tests/compiler/resolve-function-expression.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\08\00\00\00\01\00\00\00\00\00\00\00\03\00\00\00\08\00\00\00\01") @@ -50,17 +49,16 @@ i32.const 1424 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u - local.tee $5 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + local.tee $4 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 @@ -100,9 +98,9 @@ i32.const 100000 i32.lt_u select - local.get $5 + local.get $4 i32.add - local.tee $6 + local.tee $5 i32.const 1 i32.shl local.tee $2 @@ -124,7 +122,7 @@ global.get $~lib/rt/stub/offset i32.const 4 i32.add - local.tee $3 + local.tee $6 local.get $1 i32.const 19 i32.add @@ -143,12 +141,12 @@ i32.add i32.const -16 i32.and - local.tee $4 + local.tee $3 i32.gt_u if local.get $7 local.get $1 - local.get $4 + local.get $3 i32.sub i32.const 65535 i32.add @@ -156,16 +154,16 @@ i32.and i32.const 16 i32.shr_u - local.tee $4 + local.tee $3 + local.get $3 local.get $7 - local.get $4 - i32.gt_s + i32.lt_s select memory.grow i32.const 0 i32.lt_s if - local.get $4 + local.get $3 memory.grow i32.const 0 i32.lt_s @@ -178,7 +176,7 @@ global.set $~lib/rt/stub/offset local.get $9 i32.store - local.get $3 + local.get $6 i32.const 4 i32.sub local.tee $1 @@ -193,36 +191,33 @@ local.get $1 local.get $2 i32.store offset=16 - local.get $3 + local.get $6 i32.const 16 i32.add local.tee $1 local.set $2 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $3 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $2 - local.get $6 + local.get $5 i32.const 1 i32.sub - local.tee $6 + local.tee $5 i32.const 1 i32.shl i32.add - local.get $3 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end - local.get $5 + local.get $4 if local.get $1 i32.const 45 @@ -230,84 +225,115 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (result i32) + (func $~lib/string/String.__eq (param $0 i32) (result i32) + (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) - i32.const 1552 - local.set $3 local.get $0 - i32.const 7 - i32.and - i32.eqz - i32.const 0 - local.get $1 - i32.const 4 - i32.ge_u - select + i32.const 1552 + i32.eq if - loop $do-continue|0 - local.get $0 - i64.load - local.get $3 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $1 - i32.const 4 - i32.sub - local.tee $1 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $1 - local.tee $2 i32.const 1 + return + end + block $folding-inner0 + local.get $0 + i32.eqz + br_if $folding-inner0 + local.get $0 + i32.const 20 i32.sub - local.set $1 - local.get $2 - if - local.get $3 - i32.load16_u - local.tee $2 + i32.load offset=16 + i32.const 1 + i32.shr_u + local.tee $1 + i32.const 1548 + i32.load + i32.const 1 + i32.shr_u + i32.ne + br_if $folding-inner0 + block $__inlined_func$~lib/util/string/compareImpl (result i32) + i32.const 1552 + local.set $3 local.get $0 - i32.load16_u - local.tee $4 - i32.ne + local.tee $2 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.tee $0 + i32.const 4 + i32.ge_u + select if - local.get $4 - local.get $2 + loop $do-continue|0 + local.get $2 + i64.load + local.get $3 + i64.load + i64.eq + if + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $1 + i32.const 1 i32.sub - return + local.set $0 + local.get $1 + if + local.get $3 + i32.load16_u + local.tee $1 + local.get $2 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $4 + local.get $1 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $2 + i32.const 2 + i32.add + local.set $2 + local.get $3 + i32.const 2 + i32.add + local.set $3 + br $while-continue|1 + end end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $3 - i32.const 2 - i32.add - local.set $3 - br $while-continue|1 + i32.const 0 end + i32.eqz + return end i32.const 0 ) (func $~start - (local $0 i32) - (local $1 i32) i32.const 2 i32.const 1056 i32.load @@ -338,43 +364,12 @@ end i32.const 1564 global.set $~lib/rt/stub/offset - block $__inlined_func$~lib/string/String.__eq (result i32) - i32.const 1 - i32.const 0 - i32.const 1200 - i32.load - call_indirect (type $i32_=>_i32) - call $~lib/util/number/itoa32 - local.tee $0 - i32.const 1552 - i32.eq - br_if $__inlined_func$~lib/string/String.__eq - drop - block $folding-inner0 - local.get $0 - i32.eqz - br_if $folding-inner0 - local.get $0 - i32.const 20 - i32.sub - i32.load offset=16 - i32.const 1 - i32.shr_u - local.tee $1 - i32.const 1548 - i32.load - i32.const 1 - i32.shr_u - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - call $~lib/util/string/compareImpl - i32.eqz - br $__inlined_func$~lib/string/String.__eq - end - i32.const 0 - end + i32.const 0 + i32.const 1200 + i32.load + call_indirect (type $i32_=>_i32) + call $~lib/util/number/itoa32 + call $~lib/string/String.__eq i32.eqz if i32.const 0 diff --git a/tests/compiler/resolve-nested.optimized.wat b/tests/compiler/resolve-nested.optimized.wat index 2de1acb600..81f64a59a7 100644 --- a/tests/compiler/resolve-nested.optimized.wat +++ b/tests/compiler/resolve-nested.optimized.wat @@ -53,9 +53,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-new.optimized.wat b/tests/compiler/resolve-new.optimized.wat index 0a33c8b8c8..d4df6fd549 100644 --- a/tests/compiler/resolve-new.optimized.wat +++ b/tests/compiler/resolve-new.optimized.wat @@ -40,9 +40,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/resolve-propertyaccess.optimized.wat b/tests/compiler/resolve-propertyaccess.optimized.wat index 9bbbc137cf..6b52f8db64 100644 --- a/tests/compiler/resolve-propertyaccess.optimized.wat +++ b/tests/compiler/resolve-propertyaccess.optimized.wat @@ -3,7 +3,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "d\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") @@ -85,9 +84,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -130,24 +129,22 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if i32.const 1248 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u - local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + local.tee $2 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 @@ -187,9 +184,9 @@ i32.const 100000 i32.lt_u select - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 @@ -197,30 +194,27 @@ local.tee $3 local.set $4 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $5 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $4 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end - local.get $1 + local.get $2 if local.get $3 i32.const 45 @@ -228,84 +222,10 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -335,10 +255,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/resolve-ternary.optimized.wat b/tests/compiler/resolve-ternary.optimized.wat index bd5f0c7304..e6831492bd 100644 --- a/tests/compiler/resolve-ternary.optimized.wat +++ b/tests/compiler/resolve-ternary.optimized.wat @@ -597,10 +597,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -989,12 +989,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1376,6 +1376,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1384,8 +1385,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1528,16 +1528,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -1546,11 +1537,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -1931,11 +1927,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -2005,12 +2001,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -2050,16 +2046,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -2178,9 +2174,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) i32.const 2 @@ -2634,8 +2630,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/resolve-unary.optimized.wat b/tests/compiler/resolve-unary.optimized.wat index bba1750db5..8f05045e6c 100644 --- a/tests/compiler/resolve-unary.optimized.wat +++ b/tests/compiler/resolve-unary.optimized.wat @@ -3,7 +3,6 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "d\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00d\00\00\00t\00o\00S\00t\00r\00i\00n\00g\00(\00)\00 \00r\00a\00d\00i\00x\00 \00a\00r\00g\00u\00m\00e\00n\00t\00 \00m\00u\00s\00t\00 \00b\00e\00 \00b\00e\00t\00w\00e\00e\00n\00 \002\00 \00a\00n\00d\00 \003\006") @@ -90,9 +89,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -135,24 +134,22 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) local.get $0 i32.eqz if i32.const 1248 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u - local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 + local.tee $2 + select + local.tee $0 i32.const 10 i32.ge_u i32.const 1 @@ -192,9 +189,9 @@ i32.const 100000 i32.lt_u select - local.get $1 + local.get $2 i32.add - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.const 1 @@ -202,30 +199,27 @@ local.tee $3 local.set $4 loop $do-continue|0 - local.get $0 - i32.const 10 - i32.rem_u - local.set $5 - local.get $0 - i32.const 10 - i32.div_u - local.set $0 local.get $4 - local.get $2 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $0 + i32.const 10 + i32.div_u + local.tee $0 br_if $do-continue|0 end - local.get $1 + local.get $2 if local.get $3 i32.const 45 @@ -233,84 +227,10 @@ end local.get $3 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -340,10 +260,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/retain-release-sanity.optimized.wat b/tests/compiler/retain-release-sanity.optimized.wat index 7bb37ef329..c733742554 100644 --- a/tests/compiler/retain-release-sanity.optimized.wat +++ b/tests/compiler/retain-release-sanity.optimized.wat @@ -590,10 +590,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -982,12 +982,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -1578,6 +1578,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1586,8 +1587,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1757,8 +1757,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1392 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -1777,9 +1775,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -1797,57 +1795,57 @@ i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 i32.const 12 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 12 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.set $1 - local.get $2 - local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 12 i32.store offset=8 - local.get $0 + local.get $2 i32.const 3 i32.store offset=12 - local.get $0 + local.get $2 call $~lib/array/Array#push - local.get $0 + local.get $2 call $~lib/array/Array#push - local.get $0 + local.get $2 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.lt_s if @@ -1858,71 +1856,71 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 local.get $2 + i32.load offset=4 + local.get $1 i32.const 1 i32.sub - local.tee $2 + local.tee $1 i32.const 2 i32.shl i32.add i32.load drop - local.get $0 local.get $2 + local.get $1 i32.store offset=12 - local.get $0 + local.get $2 call $~lib/rt/pure/__release i32.const 16 i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 i32.const 0 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.set $1 - local.get $2 - local.get $0 i32.load local.tee $4 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $4 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 - local.get $0 + local.get $2 i32.const 0 i32.store offset=12 - local.get $0 + local.get $2 loop $for-loop|0 local.get $3 i32.const 10 @@ -1947,28 +1945,28 @@ i32.const 0 i32.const 0 call $~lib/rt/pure/__new - local.tee $0 + local.tee $1 i32.const 0 call $~lib/memory/memory.fill - local.get $0 - local.set $1 - local.get $0 + local.get $1 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $5 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 + local.set $0 local.get $5 call $~lib/rt/pure/__release end local.get $2 - local.get $1 + local.get $0 i32.store local.get $2 - local.get $0 + local.get $1 i32.store offset=4 local.get $2 i32.const 0 @@ -1986,14 +1984,14 @@ local.get $2 local.get $2 i32.load offset=12 - local.tee $1 + local.tee $5 i32.const 1 i32.add - local.tee $5 + local.tee $1 call $~lib/array/ensureSize local.get $2 i32.load offset=4 - local.get $1 + local.get $5 i32.const 2 i32.shl i32.add @@ -2001,7 +1999,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $1 i32.store offset=12 i32.const 1392 call $~lib/rt/pure/__release @@ -2025,15 +2023,15 @@ i32.const 1424 i32.const 1456 call $~lib/string/String.__concat - local.tee $0 - call $~lib/rt/pure/__retain local.tee $2 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 1520 call $~lib/string/String.__concat - local.get $0 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release call $~lib/rt/pure/__release i32.const 4 i32.const 6 @@ -2050,7 +2048,8 @@ i32.const 0 i32.store local.get $1 - local.tee $0 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $3 @@ -2065,11 +2064,12 @@ local.get $2 local.get $0 i32.store + local.get $2 + local.set $0 local.get $1 local.set $3 local.get $1 local.get $2 - local.tee $0 i32.load local.tee $4 i32.ne @@ -2099,7 +2099,8 @@ local.get $0 i32.store local.get $2 - local.tee $0 + local.set $0 + local.get $2 local.get $1 i32.load local.tee $3 @@ -2115,7 +2116,8 @@ local.get $0 i32.store local.get $1 - local.tee $0 + local.set $0 + local.get $1 local.get $2 i32.load local.tee $3 @@ -2202,8 +2204,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -2372,8 +2373,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2438,9 +2437,9 @@ global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_u + local.get $4 + i32.gt_u if local.get $4 i32.load @@ -2450,8 +2449,6 @@ i32.const 268435455 i32.and i32.const 0 - i32.gt_u - i32.const 0 local.get $2 i32.const 1879048192 i32.and @@ -2574,8 +2571,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -2679,35 +2675,36 @@ unreachable end local.get $0 - i32.load offset=4 local.tee $2 + i32.load offset=4 + local.tee $3 local.get $0 i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $4 loop $while-continue|0 - local.get $2 local.get $3 + local.get $4 i32.lt_u if - local.get $2 + local.get $3 i32.load - local.tee $4 + local.tee $0 if - local.get $4 + local.get $0 local.get $1 call $~lib/rt/pure/__visit end - local.get $2 + local.get $3 i32.const 4 i32.add - local.set $2 + local.set $3 br $while-continue|0 end end - local.get $0 + local.get $2 i32.load local.get $1 call $~lib/rt/pure/__visit diff --git a/tests/compiler/retain-release.optimized.wat b/tests/compiler/retain-release.optimized.wat index 8461371248..e26dc6aa83 100644 --- a/tests/compiler/retain-release.optimized.wat +++ b/tests/compiler/retain-release.optimized.wat @@ -112,9 +112,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/retain-return.optimized.wat b/tests/compiler/retain-return.optimized.wat index dbca389ca6..9d06a5a8d0 100644 --- a/tests/compiler/retain-return.optimized.wat +++ b/tests/compiler/retain-return.optimized.wat @@ -1,9 +1,9 @@ (module (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -571,85 +571,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1424 - i32.const 0 - i32.store - i32.const 2992 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1424 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1424 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1424 - i32.const 2996 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1424 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -736,9 +657,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -849,6 +770,111 @@ end local.get $1 ) + (func $~lib/rt/pure/__new (result i32) + (local $0 i32) + (local $1 i32) + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1424 + i32.const 0 + i32.store + i32.const 2992 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1424 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1424 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1424 + i32.const 2996 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1424 + global.set $~lib/rt/tlsf/ROOT + end + global.get $~lib/rt/tlsf/ROOT + call $~lib/rt/tlsf/allocateBlock + i32.const 4 + i32.add + local.tee $1 + i32.const 4 + i32.sub + local.tee $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 3 + i32.store offset=12 + local.get $0 + i32.const 0 + i32.store offset=16 + local.get $1 + i32.const 16 + i32.add + ) (func $~lib/rt/pure/__retain (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -898,40 +924,9 @@ end local.get $0 ) - (func $retain-return/Ref#constructor (result i32) - (local $0 i32) - (local $1 i32) - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - call $~lib/rt/tlsf/allocateBlock - i32.const 4 - i32.add - local.tee $1 - i32.const 4 - i32.sub - local.tee $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 3 - i32.store offset=12 - local.get $0 - i32.const 0 - i32.store offset=16 - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/pure/__retain - ) (func $retain-return/returnNew (result i32) - call $retain-return/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain ) (func $~lib/rt/pure/__release (param $0 i32) local.get $0 @@ -952,17 +947,25 @@ local.get $0 call $~lib/rt/pure/__retain ) - (func $start:retain-return + (func $~start (local $0 i32) - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor - call $~lib/rt/pure/__release - call $retain-return/Ref#constructor + global.get $~started + if + return + else + i32.const 1 + global.set $~started + end + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + drop + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain global.set $retain-return/ref i32.const 1248 i32.load @@ -1023,16 +1026,6 @@ i32.const 0 global.set $retain-return/ref ) - (func $~start - global.get $~started - if - return - else - i32.const 1 - global.set $~started - end - call $start:retain-return - ) (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) @@ -1105,8 +1098,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/rt/finalize.optimized.wat b/tests/compiler/rt/finalize.optimized.wat index 325ff6ffd5..eb656bc37a 100644 --- a/tests/compiler/rt/finalize.optimized.wat +++ b/tests/compiler/rt/finalize.optimized.wat @@ -2,8 +2,8 @@ (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_f64_f64_f64_f64_f64_=>_none (func (param i32 i32 f64 f64 f64 f64 f64))) @@ -592,10 +592,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -797,86 +797,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -980,12 +904,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -997,10 +921,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/tlsf/__alloc (param $0 i32) (result i32) @@ -1744,92 +1737,13 @@ end end ) - (func $~lib/rt/pure/growRoots - (local $0 i32) + (func $~lib/rt/pure/decrement (param $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - global.get $~lib/rt/pure/CUR - global.get $~lib/rt/pure/ROOTS - local.tee $0 - i32.sub - local.tee $2 - i32.const 1 - i32.shl - local.tee $1 - i32.const 256 - local.get $1 - i32.const 256 - i32.gt_u - select - local.tee $4 - call $~lib/rt/tlsf/__alloc - local.tee $1 - local.get $0 - local.get $2 - call $~lib/memory/memory.copy - local.get $0 - if - local.get $0 - i32.const 1660 - i32.ge_u - if - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - global.get $~lib/rt/tlsf/ROOT - local.get $0 - i32.const 4 - i32.sub - local.set $3 - local.get $0 - i32.const 15 - i32.and - i32.eqz - i32.const 0 - local.get $0 - select - if (result i32) - local.get $3 - i32.load - i32.const 1 - i32.and - i32.eqz - else - i32.const 0 - end - i32.eqz - if - i32.const 0 - i32.const 1296 - i32.const 563 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $3 - call $~lib/rt/tlsf/freeBlock - end - end - local.get $1 - global.set $~lib/rt/pure/ROOTS - local.get $1 - local.get $2 - i32.add - global.set $~lib/rt/pure/CUR - local.get $1 - local.get $4 - i32.add - global.set $~lib/rt/pure/END - ) - (func $~lib/rt/pure/decrement (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) + (local $6 i32) local.get $0 i32.load offset=4 local.tee $2 @@ -1870,8 +1784,7 @@ end else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 @@ -1902,8 +1815,17 @@ i32.load i32.const 32 i32.and - i32.eqz if + local.get $0 + local.get $1 + i32.const 1 + i32.sub + local.get $2 + i32.const -268435456 + i32.and + i32.or + i32.store offset=4 + else local.get $0 local.get $1 i32.const 1 @@ -1921,7 +1843,80 @@ global.get $~lib/rt/pure/END i32.ge_u if - call $~lib/rt/pure/growRoots + global.get $~lib/rt/pure/CUR + global.get $~lib/rt/pure/ROOTS + local.tee $1 + i32.sub + local.tee $3 + i32.const 1 + i32.shl + local.tee $2 + i32.const 256 + local.get $2 + i32.const 256 + i32.gt_u + select + local.tee $5 + call $~lib/rt/tlsf/__alloc + local.tee $2 + local.get $1 + local.get $3 + call $~lib/memory/memory.copy + local.get $1 + if + local.get $1 + i32.const 1660 + i32.ge_u + if + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end + global.get $~lib/rt/tlsf/ROOT + local.get $1 + i32.const 4 + i32.sub + local.set $4 + local.get $1 + i32.const 15 + i32.and + i32.eqz + i32.const 0 + local.get $1 + select + if (result i32) + local.get $4 + i32.load + i32.const 1 + i32.and + i32.eqz + else + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1296 + i32.const 563 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/tlsf/freeBlock + end + end + local.get $2 + global.set $~lib/rt/pure/ROOTS + local.get $2 + local.get $3 + i32.add + global.set $~lib/rt/pure/CUR + local.get $2 + local.get $5 + i32.add + global.set $~lib/rt/pure/END global.get $~lib/rt/pure/CUR local.set $1 end @@ -1933,16 +1928,6 @@ i32.add global.set $~lib/rt/pure/CUR end - else - local.get $0 - local.get $1 - i32.const 1 - i32.sub - local.get $2 - i32.const -268435456 - i32.and - i32.or - i32.store offset=4 end end ) @@ -1996,8 +1981,6 @@ local.get $1 i32.const 268435455 i32.and - i32.const 0 - i32.gt_u if local.get $0 call $~lib/rt/pure/scanBlack @@ -2061,9 +2044,9 @@ global.get $~lib/rt/pure/CUR local.set $0 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_u + local.get $4 + i32.gt_u if local.get $4 i32.load @@ -2073,8 +2056,6 @@ i32.const 268435455 i32.and i32.const 0 - i32.gt_u - i32.const 0 local.get $2 i32.const 1879048192 i32.and @@ -2196,8 +2177,7 @@ i32.load offset=4 i32.const 268435455 i32.and - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/rt/instanceof.optimized.wat b/tests/compiler/rt/instanceof.optimized.wat index 64c70a99ff..1b13854d22 100644 --- a/tests/compiler/rt/instanceof.optimized.wat +++ b/tests/compiler/rt/instanceof.optimized.wat @@ -53,9 +53,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/rt/stub-realloc.optimized.wat b/tests/compiler/rt/stub-realloc.optimized.wat index eecb8c92b7..f54be35f2e 100644 --- a/tests/compiler/rt/stub-realloc.optimized.wat +++ b/tests/compiler/rt/stub-realloc.optimized.wat @@ -61,9 +61,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -369,9 +369,9 @@ i32.const 1 i32.shl local.tee $1 - local.get $2 local.get $1 - i32.gt_u + local.get $2 + i32.lt_u select call $~lib/rt/stub/__alloc local.tee $1 diff --git a/tests/compiler/runtime-full.optimized.wat b/tests/compiler/runtime-full.optimized.wat index 747980eac8..72fd554f5d 100644 --- a/tests/compiler/runtime-full.optimized.wat +++ b/tests/compiler/runtime-full.optimized.wat @@ -571,10 +571,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -963,12 +963,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1350,6 +1350,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1358,8 +1359,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -1527,8 +1527,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/runtime-stub.optimized.wat b/tests/compiler/runtime-stub.optimized.wat index 41459d0914..7878acae00 100644 --- a/tests/compiler/runtime-stub.optimized.wat +++ b/tests/compiler/runtime-stub.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_=>_none (func (param i32))) + (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -56,9 +56,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -304,12 +304,26 @@ end end ) - (func $~lib/rt/stub/__realloc (param $0 i32) (param $1 i32) (result i32) + (func $~lib/rt/stub/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) + (local $6 i32) + local.get $1 + i32.const 1073741804 + i32.gt_u + if + unreachable + end + local.get $1 + i32.const 16 + i32.add + local.set $3 local.get $0 + i32.const 16 + i32.sub + local.tee $0 i32.const 15 i32.and i32.eqz @@ -330,22 +344,22 @@ local.get $0 i32.const 4 i32.sub - local.tee $4 + local.tee $5 i32.load - local.tee $3 + local.tee $4 i32.add i32.eq - local.set $5 - local.get $1 + local.set $6 + local.get $3 call $~lib/rt/stub/computeSize local.set $2 - local.get $1 local.get $3 + local.get $4 i32.gt_u if - local.get $5 + local.get $6 if - local.get $1 + local.get $3 i32.const 1073741820 i32.gt_u if @@ -355,56 +369,40 @@ local.get $2 i32.add call $~lib/rt/stub/maybeGrowMemory - local.get $4 + local.get $5 local.get $2 i32.store else local.get $2 - local.get $3 + local.get $4 i32.const 1 i32.shl - local.tee $1 + local.tee $3 local.get $2 - local.get $1 + local.get $3 i32.gt_u select call $~lib/rt/stub/__alloc - local.tee $1 + local.tee $2 local.get $0 - local.get $3 + local.get $4 call $~lib/memory/memory.copy - local.get $1 + local.get $2 local.set $0 end else - local.get $5 + local.get $6 if local.get $0 local.get $2 i32.add global.set $~lib/rt/stub/offset - local.get $4 + local.get $5 local.get $2 i32.store end end local.get $0 - ) - (func $~lib/rt/stub/__renew (param $0 i32) (param $1 i32) (result i32) - local.get $1 - i32.const 1073741804 - i32.gt_u - if - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.get $1 - i32.const 16 - i32.add - call $~lib/rt/stub/__realloc - local.tee $0 i32.const 4 i32.sub local.get $1 diff --git a/tests/compiler/std/array-access.optimized.wat b/tests/compiler/std/array-access.optimized.wat index 164c236f80..c1f0472c14 100644 --- a/tests/compiler/std/array-access.optimized.wat +++ b/tests/compiler/std/array-access.optimized.wat @@ -2,7 +2,6 @@ (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "$\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00$\00\00\00I\00n\00d\00e\00x\00 \00o\00u\00t\00 \00o\00f\00 \00r\00a\00n\00g\00e") @@ -49,13 +48,15 @@ local.get $0 ) (func $std/array-access/i32ArrayArrayElementAccess (param $0 i32) (result i32) - i32.const 1 + (local $1 i32) local.get $0 i32.const 0 call $~lib/array/Array<~lib/array/Array>#__get local.tee $0 + local.get $0 i32.load offset=12 - i32.ge_u + i32.const 1 + i32.le_u if i32.const 1056 i32.const 1120 @@ -64,7 +65,6 @@ call $~lib/builtins/abort unreachable end - local.get $0 i32.load offset=4 i32.load offset=4 ) @@ -78,96 +78,18 @@ i32.const 1 i32.shr_u ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - i32.const 1296 - local.set $3 - local.get $0 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.tee $1 - i32.const 7 - i32.and - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $1 - i64.load - local.get $3 - i64.load - i64.eq - if - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $3 - i32.const 8 - i32.add - local.set $3 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $0 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - if - local.get $3 - i32.load16_u - local.tee $0 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $4 - local.get $0 - i32.sub - return - end - local.get $1 - i32.const 2 - i32.add - local.set $1 - local.get $3 - i32.const 2 - i32.add - local.set $3 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String#startsWith (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) + (local $4 i32) i32.const 1292 i32.load i32.const 1 i32.shr_u - local.tee $1 - local.set $2 - local.get $1 + local.tee $4 + local.set $1 + local.get $4 i32.const 0 local.get $0 i32.const 20 @@ -175,23 +97,97 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $1 + local.tee $2 + local.get $2 i32.const 0 - local.get $1 - i32.lt_s + i32.gt_s select local.tee $3 i32.add - local.get $1 + local.get $2 i32.gt_s if i32.const 0 return end - local.get $0 - local.get $3 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + i32.const 1296 + local.set $2 + local.get $0 + local.get $3 + i32.const 1 + i32.shl + i32.add + local.tee $3 + i32.const 7 + i32.and + i32.eqz + i32.const 0 + local.get $1 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $2 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $2 + i32.const 8 + i32.add + local.set $2 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $1 + if + local.get $2 + i32.load16_u + local.tee $1 + local.get $3 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $4 + local.get $1 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $2 + i32.const 2 + i32.add + local.set $2 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz ) (func $std/array-access/stringArrayMethodCall (param $0 i32) (result i32) diff --git a/tests/compiler/std/array-literal.optimized.wat b/tests/compiler/std/array-literal.optimized.wat index abbe3d1e3a..d85fd42a46 100644 --- a/tests/compiler/std/array-literal.optimized.wat +++ b/tests/compiler/std/array-literal.optimized.wat @@ -1,7 +1,7 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) + (type $none_=>_none (func)) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) @@ -618,85 +618,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1632 - i32.const 0 - i32.store - i32.const 3200 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1632 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1632 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1632 - i32.const 3204 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1632 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -826,86 +747,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1600 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1009,12 +854,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1600 @@ -1026,10 +871,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1600 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1046,17 +960,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1632 + i32.const 0 + i32.store + i32.const 3200 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1632 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1632 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1632 + i32.const 3204 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1632 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1537,9 +1523,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $4 i32.const 268435455 i32.and local.set $1 @@ -1565,13 +1552,16 @@ block $switch$1$default block $switch$1$case$4 local.get $0 - i32.const 12 + i32.const 20 i32.add + local.tee $2 + i32.const 8 + i32.sub i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $folding-inner0 $folding-inner0 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $__inlined_func$~lib/rt/__visit_members $folding-inner1 $switch$1$default end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load local.tee $1 if local.get $1 @@ -1581,44 +1571,45 @@ end unreachable end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=24 + local.get $2 local.tee $1 - local.get $0 - i32.load offset=32 + i32.load offset=4 + local.tee $3 + local.get $1 + i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $2 loop $while-continue|0 - local.get $1 + local.get $2 local.get $3 - i32.lt_u + i32.gt_u if - local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 if - local.get $4 + local.get $5 call $~lib/rt/pure/__visit end - local.get $1 + local.get $3 i32.const 4 i32.add - local.set $1 + local.set $3 br $while-continue|0 end end - local.get $0 - i32.load offset=20 + local.get $1 + i32.load call $~lib/rt/pure/__visit end - local.get $2 + local.get $4 i32.const -2147483648 i32.and if @@ -1640,8 +1631,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1536 @@ -1654,7 +1644,7 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/array.optimized.wat b/tests/compiler/std/array.optimized.wat index a4e0ef99fb..eb74f82c51 100644 --- a/tests/compiler/std/array.optimized.wat +++ b/tests/compiler/std/array.optimized.wat @@ -2,15 +2,14 @@ (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) - (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_none (func (param i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (type $none_=>_none (func)) (type $none_=>_f64 (func (result f64))) - (type $none_=>_i32 (func (result i32))) (type $i32_i64_=>_i32 (func (param i32 i64) (result i32))) (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_i32_i32_=>_f32 (func (param i32 i32 i32) (result f32))) @@ -1069,10 +1068,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1461,12 +1460,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -2326,9 +2325,9 @@ br_if $folding-inner1 end loop $for-loop|0 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 @@ -2523,6 +2522,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -2531,8 +2531,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2687,11 +2686,11 @@ (local $2 i32) (local $3 i32) (local $4 i32) + local.get $1 local.get $0 i32.load offset=12 local.tee $2 - local.get $1 - i32.gt_s + i32.lt_s if local.get $0 i32.load offset=4 @@ -2881,9 +2880,9 @@ local.get $1 i32.sub local.tee $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select i32.const 2 i32.shl @@ -2986,9 +2985,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load @@ -3197,9 +3196,9 @@ local.tee $1 i32.sub local.tee $2 - i32.const 2 local.get $2 - i32.lt_s + i32.const 2 + i32.gt_s select local.tee $2 i32.const 0 @@ -3292,84 +3291,6 @@ end local.get $0 ) - (func $~lib/array/Array#splice (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - i32.const 0 - local.get $0 - i32.load offset=12 - local.tee $3 - i32.const 0 - local.get $3 - i32.lt_s - select - local.set $2 - i32.const 1 - local.get $3 - local.get $2 - i32.sub - local.tee $1 - i32.const 1 - local.get $1 - i32.lt_s - select - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - local.tee $1 - i32.const 2 - i32.const 11 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.tee $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.tee $6 - local.get $1 - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - local.get $1 - local.get $2 - i32.add - local.tee $2 - i32.ne - if - local.get $6 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $3 - local.get $2 - i32.sub - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - end - local.get $0 - local.get $3 - local.get $1 - i32.sub - i32.store offset=12 - local.get $4 - ) (func $~lib/array/Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 @@ -3445,9 +3366,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3538,9 +3459,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3632,9 +3553,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3729,9 +3650,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -3953,9 +3874,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -4044,9 +3965,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -4149,9 +4070,9 @@ local.get $0 i32.load offset=12 local.tee $4 - local.get $5 local.get $4 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -4367,91 +4288,6 @@ unreachable end ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - (local $7 f32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $4 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f32_f32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $7 - f32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - f32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/rt/tlsf/__free (param $0 i32) local.get $0 i32.const 12680 @@ -4621,6 +4457,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $5 local.get $1 i32.const 5 @@ -4638,8 +4475,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -4730,78 +4566,158 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f32) + (local $5 i32) (local $6 f32) + (local $7 f32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 f32.load offset=4 - local.set $5 - local.get $1 - f32.load local.set $6 + local.get $4 + f32.load + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 - local.get $3 + local.get $7 + local.get $5 i32.load call_indirect (type $f32_f32_=>_i32) i32.const 0 i32.lt_s if - local.get $1 - local.get $6 + local.get $4 + local.get $7 f32.store offset=4 - local.get $1 - local.get $5 + local.get $4 + local.get $6 f32.store end br $folding-inner0 end - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 + local.set $9 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $2 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $10 + loop $for-loop|0 + local.get $3 + local.get $8 + i32.gt_s + if + local.get $4 + local.get $8 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $6 + local.get $8 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $6 + local.get $7 + local.get $10 + i32.load + call_indirect (type $f32_f32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $7 + f32.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $6 + f32.store + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $10 + call $~lib/rt/pure/__release else - local.get $1 - local.get $2 local.get $4 + local.get $1 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f32) (param $1 f32) (result i32) @@ -4833,168 +4749,6 @@ i32.lt_s i32.sub ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - block $folding-inner1 - block $folding-inner0 - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - i32.eq - br_if $folding-inner1 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f32.ne - if (result i32) - local.get $1 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f32.ne - else - i32.const 0 - end - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.get $1 - local.get $2 - call $~lib/array/Array#__get - f32.ne - br_if $folding-inner0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - br $folding-inner1 - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $4 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 f64) @@ -5147,6 +4901,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $5 local.get $1 i32.const 5 @@ -5164,8 +4919,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -5256,78 +5010,158 @@ (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 f64) + (local $5 i32) (local $6 f64) + (local $7 f64) + (local $8 i32) + (local $9 i32) + (local $10 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 f64.load offset=8 - local.set $5 - local.get $1 - f64.load local.set $6 + local.get $4 + f64.load + local.set $7 i32.const 2 global.set $~argumentsLength - local.get $5 local.get $6 - local.get $3 + local.get $7 + local.get $5 i32.load call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if - local.get $1 - local.get $6 - f64.store offset=8 - local.get $1 - local.get $5 + local.get $4 + local.get $7 + f64.store offset=8 + local.get $4 + local.get $6 f64.store end br $folding-inner0 end - local.get $3 + local.get $5 call $~lib/rt/pure/__retain - local.set $4 - local.get $2 + local.set $9 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $2 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $10 + loop $for-loop|0 + local.get $3 + local.get $8 + i32.gt_s + if + local.get $4 + local.get $8 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $6 + local.get $8 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $7 + i32.const 2 + global.set $~argumentsLength + local.get $6 + local.get $7 + local.get $10 + i32.load + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $7 + f64.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $6 + f64.store + local.get $8 + i32.const 1 + i32.add + local.set $8 + br $for-loop|0 + end + end + local.get $10 + call $~lib/rt/pure/__release else - local.get $1 - local.get $2 local.get $4 + local.get $1 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $3 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) @@ -5380,168 +5214,6 @@ i32.add f64.load ) - (func $std/array/isArraysEqual (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - block $folding-inner1 - block $folding-inner0 - local.get $0 - i32.load offset=12 - local.tee $4 - local.get $1 - i32.load offset=12 - i32.ne - br_if $folding-inner0 - local.get $0 - local.get $1 - i32.eq - br_if $folding-inner1 - loop $for-loop|0 - local.get $2 - local.get $4 - i32.lt_s - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f64.ne - if (result i32) - local.get $1 - local.get $2 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 - f64.ne - else - i32.const 0 - end - i32.eqz - if - local.get $0 - local.get $2 - call $~lib/array/Array#__get - local.get $1 - local.get $2 - call $~lib/array/Array#__get - f64.ne - br_if $folding-inner0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - br $folding-inner1 - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - return - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $4 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $4 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $7 - i32.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 2 - i32.shl - i32.add - local.get $6 - i32.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -5694,6 +5366,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -5711,8 +5384,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -5803,78 +5475,158 @@ (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) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 i32.load offset=4 local.set $2 - local.get $1 + local.get $4 i32.load - local.set $3 + local.set $1 i32.const 2 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $4 + local.get $1 + local.get $5 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $4 local.get $1 - local.get $3 i32.store offset=4 - local.get $1 + local.get $4 local.get $2 i32.store end br $folding-inner0 end - local.get $2 - local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__retain - local.set $2 - local.get $3 + local.set $7 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $3 - local.get $2 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $7 + call $~lib/rt/pure/__retain + local.set $8 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $4 + local.get $6 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $9 + local.get $6 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $4 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.set $10 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $10 + local.get $8 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $10 + i32.store + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.const 2 + i32.shl + i32.add + local.get $9 + i32.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $8 + call $~lib/rt/pure/__release else + local.get $4 local.get $1 - local.get $3 - local.get $2 + local.get $7 call $~lib/util/sort/weakHeapSort end - local.get $2 + local.get $7 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 i32) (param $1 i32) (result i32) @@ -5918,9 +5670,9 @@ call $~lib/array/Array#constructor local.set $2 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $2 local.get $1 @@ -5987,9 +5739,9 @@ call $~lib/array/Array#constructor local.set $2 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s if local.get $2 local.get $1 @@ -6166,89 +5918,6 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedNestedArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - i32.const 22 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - i32.const 8 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.const 8 - call $~lib/memory/memory.fill - local.get $1 - local.set $0 - local.get $1 - local.get $4 - i32.load - local.tee $2 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $4 - local.get $0 - i32.store - local.get $4 - local.get $1 - i32.store offset=4 - local.get $4 - i32.const 8 - i32.store offset=8 - local.get $4 - i32.const 2 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 2 - i32.lt_s - if - i32.const 1 - call $~lib/array/Array#constructor - local.tee $1 - i32.const 0 - i32.const 1 - local.get $3 - i32.sub - call $~lib/array/Array#__set - local.get $4 - local.get $3 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - ) (func $start:std/array~anonymous|47 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -6278,9 +5947,9 @@ call $~lib/rt/pure/__retain local.set $6 loop $for-loop|0 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 @@ -6533,90 +6202,6 @@ local.get $5 call $~lib/rt/pure/__release ) - (func $std/array/createReverseOrderedElementsArray (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - i32.const 16 - i32.const 25 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $4 - i32.const 0 - i32.store - local.get $4 - i32.const 0 - i32.store offset=4 - local.get $4 - i32.const 0 - i32.store offset=8 - local.get $4 - i32.const 0 - i32.store offset=12 - i32.const 2048 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.const 2048 - call $~lib/memory/memory.fill - local.get $1 - local.set $0 - local.get $1 - local.get $4 - i32.load - local.tee $2 - i32.ne - if - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $4 - local.get $0 - i32.store - local.get $4 - local.get $1 - i32.store offset=4 - local.get $4 - i32.const 2048 - i32.store offset=8 - local.get $4 - i32.const 512 - i32.store offset=12 - loop $for-loop|0 - local.get $3 - i32.const 512 - i32.lt_s - if - i32.const 4 - i32.const 24 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 511 - local.get $3 - i32.sub - i32.store - local.get $4 - local.get $3 - local.get $1 - call $~lib/array/Array<~lib/array/Array>#__set - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $4 - ) (func $start:std/array~anonymous|48 (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $0 @@ -6790,9 +6375,9 @@ local.get $1 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select call $~lib/util/string/compareImpl local.get $0 @@ -7084,8 +6669,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 8256 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -7104,89 +6687,15 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release local.get $0 ) - (func $std/array/createRandomString (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 8256 - local.set $1 - loop $for-loop|0 - local.get $4 - local.get $0 - i32.lt_s - if - local.get $1 - local.tee $2 - local.get $1 - block $__inlined_func$~lib/string/String#charAt (result i32) - i32.const 8256 - call $~lib/math/NativeMath.random - i32.const 6812 - i32.load - i32.const 1 - i32.shr_u - f64.convert_i32_s - f64.mul - f64.floor - i32.trunc_f64_s - local.tee $3 - i32.const 6812 - i32.load - i32.const 1 - i32.shr_u - i32.ge_u - br_if $__inlined_func$~lib/string/String#charAt - drop - i32.const 2 - i32.const 1 - call $~lib/rt/pure/__new - local.tee $1 - local.get $3 - i32.const 1 - i32.shl - i32.const 6816 - i32.add - i32.load16_u - i32.store16 - local.get $1 - call $~lib/rt/pure/__retain - end - local.tee $3 - call $~lib/string/String.__concat - local.tee $5 - local.tee $1 - i32.ne - if - local.get $1 - call $~lib/rt/pure/__retain - local.set $1 - local.get $2 - call $~lib/rt/pure/__release - end - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $1 - ) (func $~lib/string/String#substring (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -7199,9 +6708,9 @@ i32.const 1 i32.shr_u local.tee $2 - i32.const 0 local.get $2 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $3 local.get $1 @@ -7217,18 +6726,18 @@ i32.lt_s select local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -7323,9 +6832,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|1 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $0 local.get $6 @@ -7462,16 +6971,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -7480,11 +6980,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -7498,19 +7003,18 @@ i32.const 8880 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u + local.tee $0 + select local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $0 i32.add local.tee $3 i32.const 1 @@ -7518,10 +7022,10 @@ i32.const 1 call $~lib/rt/pure/__new local.tee $2 - local.get $0 + local.get $1 local.get $3 call $~lib/util/number/utoa_dec_simple - local.get $1 + local.get $0 if local.get $2 i32.const 45 @@ -7625,9 +7129,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -7808,9 +7312,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -8074,6 +7578,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -8082,8 +7587,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -8126,11 +7630,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -8251,11 +7755,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -8374,9 +7878,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -8969,9 +8473,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -9524,9 +9028,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -9677,9 +9181,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -9798,17 +9302,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -9817,11 +9311,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -9957,9 +9457,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $4 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -10128,18 +9628,17 @@ i64.eqz br_if $__inlined_func$~lib/util/number/itoa64 drop + i64.const 0 + local.get $3 + i64.sub + local.get $3 local.get $3 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 + select + local.tee $3 i64.const 4294967295 i64.le_u if @@ -10207,9 +9706,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -10550,9 +10049,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $3 @@ -11451,13 +10950,13 @@ (local $23 i32) (local $24 i32) (local $25 i32) - (local $26 i32) - (local $27 i32) + (local $26 f32) + (local $27 f64) (local $28 i32) (local $29 i32) (local $30 i32) - (local $31 f32) - (local $32 f64) + (local $31 i32) + (local $32 i32) (local $33 i32) (local $34 i32) (local $35 i32) @@ -11483,6 +10982,7 @@ (local $55 i32) (local $56 i32) (local $57 i32) + (local $58 i32) i32.const 0 call $~lib/array/Array#constructor global.set $std/array/arr @@ -11502,51 +11002,52 @@ i32.const 5 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $0 + local.tee $2 i32.eqz if i32.const 12 i32.const 2 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.set $0 + local.set $2 end - local.get $0 + local.get $2 i32.const 0 i32.store - local.get $0 + local.get $2 i32.const 0 i32.store offset=4 - local.get $0 + local.get $2 i32.const 0 i32.store offset=8 i32.const 1 i32.const 0 call $~lib/rt/pure/__new - local.tee $2 + local.tee $1 i32.const 0 i32.const 1 call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $2 - local.tee $1 - local.get $0 i32.load - local.tee $3 + local.tee $6 i32.ne if - local.get $1 + local.get $0 call $~lib/rt/pure/__retain - local.set $1 - local.get $3 + local.set $0 + local.get $6 call $~lib/rt/pure/__release end + local.get $2 local.get $0 - local.get $1 i32.store - local.get $0 local.get $2 + local.get $1 i32.store offset=4 - local.get $0 + local.get $2 i32.const 1 i32.store offset=8 global.get $std/array/arr @@ -11561,7 +11062,7 @@ unreachable end call $~lib/rt/pure/__release - local.get $0 + local.get $2 call $~lib/rt/pure/__release i32.const 5 i32.const 0 @@ -11569,20 +11070,20 @@ i32.const 1488 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 call $std/array/isArraysEqual i32.eqz if @@ -11593,20 +11094,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1616 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 call $std/array/isArraysEqual i32.eqz if @@ -11617,20 +11118,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1648 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/array/isArraysEqual i32.eqz if @@ -11641,20 +11142,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1680 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 call $std/array/isArraysEqual i32.eqz if @@ -11665,20 +11166,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 0 i32.const 6 i32.const 1712 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 call $std/array/isArraysEqual i32.eqz if @@ -11689,17 +11190,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -11707,20 +11208,20 @@ i32.const 1744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $2 i32.const 1 i32.const 1 i32.const 3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11732,20 +11233,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 0 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1840 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11757,20 +11258,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 1 i32.const 0 i32.const -3 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1888 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11782,20 +11283,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 2 i32.const -2 i32.const 2147483647 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1936 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11807,20 +11308,20 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 i32.const 0 i32.const 1 i32.const 0 call $~lib/array/Array#fill call $~lib/rt/pure/__release - local.get $1 + local.get $2 i32.const 5 i32.const 2 i32.const 7 i32.const 1984 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -11832,17 +11333,17 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $2 call $~lib/rt/pure/__release - local.get $0 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release - local.get $4 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.load offset=12 @@ -12134,11 +11635,11 @@ call $~lib/rt/pure/__release i32.const 0 call $~lib/array/Array#constructor - local.set $0 + local.set $5 global.get $std/array/arr - local.get $0 + local.get $5 call $~lib/array/Array#concat - local.set $2 + local.set $1 global.get $std/array/arr call $std/array/internalCapacity i32.const 3 @@ -12163,7 +11664,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -12175,14 +11676,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 i32.const 2 i32.const 3 i32.const 2080 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 call $~lib/array/Array#concat call $~lib/rt/pure/__release global.get $std/array/arr @@ -12197,7 +11698,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -12210,7 +11711,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -12223,7 +11724,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -12236,19 +11737,19 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.const 46 call $~lib/array/Array#push drop - local.get $0 + local.get $5 i32.const 47 call $~lib/array/Array#push drop global.get $std/array/arr - local.get $0 + local.get $5 call $~lib/array/Array#concat - local.set $1 - local.get $2 + local.set $3 + local.get $1 call $~lib/rt/pure/__release global.get $std/array/arr call $std/array/internalCapacity @@ -12262,7 +11763,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 i32.load offset=12 i32.const 2 i32.ne @@ -12274,7 +11775,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.load offset=12 i32.const 5 i32.ne @@ -12286,7 +11787,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 0 call $~lib/array/Array#__get i32.const 43 @@ -12299,7 +11800,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 1 call $~lib/array/Array#__get i32.const 44 @@ -12312,7 +11813,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 2 call $~lib/array/Array#__get i32.const 45 @@ -12325,7 +11826,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 3 call $~lib/array/Array#__get i32.const 46 @@ -12338,7 +11839,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 i32.const 4 call $~lib/array/Array#__get i32.const 47 @@ -12351,10 +11852,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $3 call $~lib/array/Array#pop drop - local.get $1 + local.get $3 i32.load offset=12 i32.const 4 i32.ne @@ -12372,7 +11873,7 @@ i32.const 2112 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $6 i32.load offset=12 if i32.const 0 @@ -12382,13 +11883,13 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 global.get $std/array/arr call $~lib/array/Array#concat - local.set $7 - local.get $1 + local.set $1 + local.get $3 call $~lib/rt/pure/__release - local.get $7 + local.get $1 i32.load offset=12 i32.const 3 i32.ne @@ -12400,7 +11901,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $6 i32.load offset=12 if i32.const 0 @@ -12410,13 +11911,13 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $7 + local.get $1 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -12429,14 +11930,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $2 + local.tee $23 i32.const 5 i32.const 2 i32.const 3 i32.const 2192 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $24 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12462,14 +11963,14 @@ i32.const 3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $3 + local.tee $25 i32.const 5 i32.const 2 i32.const 3 i32.const 2288 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12494,14 +11995,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $5 + local.tee $18 i32.const 5 i32.const 2 i32.const 3 i32.const 2384 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12526,14 +12027,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $8 + local.tee $20 i32.const 5 i32.const 2 i32.const 3 i32.const 2480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12558,14 +12059,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $10 + local.tee $15 i32.const 5 i32.const 2 i32.const 3 i32.const 2576 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12590,14 +12091,14 @@ i32.const 3 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $11 + local.tee $17 i32.const 5 i32.const 2 i32.const 3 i32.const 2672 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12622,14 +12123,14 @@ i32.const 2 i32.const 4 call $~lib/array/Array#copyWithin - local.tee $14 + local.tee $11 i32.const 5 i32.const 2 i32.const 3 i32.const 2768 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $9 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12654,14 +12155,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $16 + local.tee $13 i32.const 5 i32.const 2 i32.const 3 i32.const 2864 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12686,14 +12187,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $18 + local.tee $8 i32.const 5 i32.const 2 i32.const 3 i32.const 2960 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $15 + local.tee $4 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12718,14 +12219,14 @@ i32.const -3 i32.const -2 call $~lib/array/Array#copyWithin - local.tee $21 + local.tee $2 i32.const 5 i32.const 2 i32.const 3 i32.const 3056 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $3 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12750,14 +12251,14 @@ i32.const -3 i32.const -1 call $~lib/array/Array#copyWithin - local.tee $20 + local.tee $5 i32.const 5 i32.const 2 i32.const 3 i32.const 3152 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12775,22 +12276,22 @@ i32.const 3200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $1 + local.set $22 local.get $0 call $~lib/rt/pure/__release - local.get $1 + local.get $22 i32.const -4 i32.const -3 i32.const 2147483647 call $~lib/array/Array#copyWithin - local.tee $0 + local.tee $1 i32.const 5 i32.const 2 i32.const 3 i32.const 3248 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -12802,55 +12303,55 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $22 call $~lib/rt/pure/__release - local.get $2 + local.get $23 call $~lib/rt/pure/__release - local.get $7 + local.get $24 call $~lib/rt/pure/__release - local.get $3 + local.get $25 call $~lib/rt/pure/__release - local.get $4 + local.get $14 call $~lib/rt/pure/__release - local.get $5 + local.get $18 call $~lib/rt/pure/__release - local.get $6 + local.get $19 call $~lib/rt/pure/__release - local.get $8 + local.get $20 call $~lib/rt/pure/__release - local.get $9 + local.get $12 call $~lib/rt/pure/__release - local.get $10 + local.get $15 call $~lib/rt/pure/__release - local.get $12 + local.get $16 call $~lib/rt/pure/__release - local.get $11 + local.get $17 call $~lib/rt/pure/__release - local.get $13 + local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $11 call $~lib/rt/pure/__release - local.get $24 + local.get $9 call $~lib/rt/pure/__release - local.get $16 + local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $7 call $~lib/rt/pure/__release - local.get $18 + local.get $8 call $~lib/rt/pure/__release - local.get $15 + local.get $4 call $~lib/rt/pure/__release - local.get $21 + local.get $2 call $~lib/rt/pure/__release - local.get $19 + local.get $3 call $~lib/rt/pure/__release - local.get $20 + local.get $5 call $~lib/rt/pure/__release - local.get $22 + local.get $6 call $~lib/rt/pure/__release - local.get $0 + local.get $1 call $~lib/rt/pure/__release - local.get $23 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 42 @@ -13430,34 +12931,34 @@ i32.const 3296 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 - local.set $7 + local.tee $5 + local.set $0 i32.const 0 - local.set $1 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - i32.const 0 - local.get $0 + local.get $5 i32.load offset=12 - local.tee $2 - i32.ge_s + local.tee $1 + i32.const 0 + i32.le_s i32.const 1 - local.get $2 + local.get $1 select if i32.const -1 - local.set $1 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $7 + local.get $0 i32.load offset=4 - local.set $7 + local.set $0 loop $while-continue|0 local.get $1 local.get $2 - i32.lt_s + i32.gt_s if - local.get $7 - local.get $1 + local.get $0 + local.get $2 i32.const 2 i32.shl i32.add @@ -13465,17 +12966,17 @@ f32.const nan:0x400000 f32.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $while-continue|0 end end i32.const -1 - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const -1 i32.ne if @@ -13492,34 +12993,34 @@ i32.const 3328 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 - local.set $3 + local.tee $6 + local.set $0 i32.const 0 - local.set $1 + local.set $2 block $__inlined_func$~lib/array/Array#indexOf - i32.const 0 - local.get $2 + local.get $6 i32.load offset=12 - local.tee $7 - i32.ge_s + local.tee $1 + i32.const 0 + i32.le_s i32.const 1 - local.get $7 + local.get $1 select if i32.const -1 - local.set $1 + local.set $2 br $__inlined_func$~lib/array/Array#indexOf end - local.get $3 + local.get $0 i32.load offset=4 - local.set $3 + local.set $0 loop $while-continue|021 local.get $1 - local.get $7 - i32.lt_s + local.get $2 + i32.gt_s if - local.get $3 - local.get $1 + local.get $0 + local.get $2 i32.const 3 i32.shl i32.add @@ -13527,17 +13028,17 @@ f64.const nan:0x8000000000000 f64.eq br_if $__inlined_func$~lib/array/Array#indexOf - local.get $1 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $while-continue|021 end end i32.const -1 - local.set $1 + local.set $2 end - local.get $1 + local.get $2 i32.const -1 i32.ne if @@ -13548,9 +13049,9 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $6 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 44 @@ -13694,8 +13195,7 @@ end block $__inlined_func$~lib/array/Array#includes (result i32) i32.const 0 - local.set $0 - i32.const 0 + local.set $2 i32.const 0 i32.const 1 i32.const 2 @@ -13703,44 +13203,45 @@ i32.const 3360 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $5 i32.load offset=12 - local.tee $2 - i32.ge_s + local.tee $1 + i32.const 0 + i32.le_s i32.const 1 - local.get $2 + local.get $1 select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $7 + local.get $5 i32.load offset=4 - local.set $3 + local.set $0 loop $while-continue|031 - local.get $0 + local.get $1 local.get $2 - i32.lt_s + i32.gt_s if i32.const 1 i32.const 1 - local.get $3 local.get $0 + local.get $2 i32.const 2 i32.shl i32.add f32.load - local.tee $31 - local.get $31 + local.tee $26 + local.get $26 f32.ne - local.get $31 + local.get $26 f32.const nan:0x400000 f32.eq select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $2 i32.const 1 i32.add - local.set $0 + local.set $2 br $while-continue|031 end end @@ -13759,42 +13260,42 @@ i32.const 0 local.set $2 i32.const 0 - i32.const 0 i32.const 1 i32.const 3 i32.const 10 i32.const 3392 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $0 + local.tee $6 i32.load offset=12 - local.tee $3 - i32.ge_s + local.tee $1 + i32.const 0 + i32.le_s i32.const 1 - local.get $3 + local.get $1 select br_if $__inlined_func$~lib/array/Array#includes drop - local.get $0 + local.get $6 i32.load offset=4 - local.set $4 + local.set $0 loop $while-continue|032 + local.get $1 local.get $2 - local.get $3 - i32.lt_s + i32.gt_s if i32.const 1 i32.const 1 - local.get $4 + local.get $0 local.get $2 i32.const 3 i32.shl i32.add f64.load - local.tee $32 - local.get $32 + local.tee $27 + local.get $27 f64.ne - local.get $32 + local.get $27 f64.const nan:0x8000000000000 f64.eq select @@ -13873,9 +13374,9 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $5 call $~lib/rt/pure/__release - local.get $0 + local.get $6 call $~lib/rt/pure/__release i32.const 5 i32.const 2 @@ -13887,14 +13388,14 @@ i32.const 0 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $5 + local.tee $37 i32.const 5 i32.const 2 i32.const 3 i32.const 3472 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $38 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13913,7 +13414,7 @@ i32.const 3520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $39 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13938,14 +13439,14 @@ i32.const 0 i32.const 0 call $~lib/array/Array#splice - local.tee $9 + local.tee $40 i32.const 0 i32.const 2 i32.const 3 i32.const 3600 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $41 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13964,7 +13465,7 @@ i32.const 3632 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $42 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -13988,14 +13489,14 @@ i32.const 2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $11 + local.tee $43 i32.const 3 i32.const 2 i32.const 3 i32.const 3728 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $44 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14014,7 +13515,7 @@ i32.const 3760 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $45 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14038,14 +13539,14 @@ i32.const 2 i32.const 2 call $~lib/array/Array#splice - local.tee $16 + local.tee $46 i32.const 2 i32.const 2 i32.const 3 i32.const 3840 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $17 + local.tee $47 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14064,7 +13565,7 @@ i32.const 3872 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $48 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14088,14 +13589,14 @@ i32.const 0 i32.const 1 call $~lib/array/Array#splice - local.tee $15 + local.tee $49 i32.const 1 i32.const 2 i32.const 3 i32.const 3952 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $50 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14114,7 +13615,7 @@ i32.const 3984 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $51 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14138,14 +13639,14 @@ i32.const -1 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $20 + local.tee $52 i32.const 1 i32.const 2 i32.const 3 i32.const 4080 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $53 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14164,7 +13665,7 @@ i32.const 4112 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $23 + local.tee $54 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14188,14 +13689,14 @@ i32.const -2 i32.const 2147483647 call $~lib/array/Array#splice - local.tee $25 + local.tee $55 i32.const 2 i32.const 2 i32.const 3 i32.const 4208 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $56 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14214,7 +13715,7 @@ i32.const 4240 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $57 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14238,14 +13739,14 @@ i32.const -2 i32.const 1 call $~lib/array/Array#splice - local.tee $28 + local.tee $58 i32.const 1 i32.const 2 i32.const 3 i32.const 4320 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $30 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14264,7 +13765,7 @@ i32.const 4352 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $30 + local.tee $31 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14288,14 +13789,14 @@ i32.const -7 i32.const 1 call $~lib/array/Array#splice - local.tee $33 + local.tee $32 i32.const 1 i32.const 2 i32.const 3 i32.const 4448 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $34 + local.tee $22 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14314,7 +13815,7 @@ i32.const 4480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $35 + local.tee $23 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14338,14 +13839,14 @@ i32.const -2 i32.const -1 call $~lib/array/Array#splice - local.tee $36 + local.tee $24 i32.const 0 i32.const 2 i32.const 3 i32.const 4576 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $37 + local.tee $25 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14364,7 +13865,7 @@ i32.const 4608 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $38 + local.tee $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14388,14 +13889,14 @@ i32.const 1 i32.const -2 call $~lib/array/Array#splice - local.tee $39 + local.tee $18 i32.const 0 i32.const 2 i32.const 3 i32.const 4704 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $40 + local.tee $19 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14414,7 +13915,7 @@ i32.const 4736 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $41 + local.tee $20 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14438,14 +13939,14 @@ i32.const 4 i32.const 0 call $~lib/array/Array#splice - local.tee $42 + local.tee $12 i32.const 0 i32.const 2 i32.const 3 i32.const 4832 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $43 + local.tee $15 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14464,7 +13965,7 @@ i32.const 4864 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $44 + local.tee $16 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14482,20 +13983,21 @@ i32.const 4912 call $~lib/rt/__newArray call $~lib/rt/pure/__retain + local.set $0 local.get $1 call $~lib/rt/pure/__release - local.tee $1 + local.get $0 i32.const 7 i32.const 0 call $~lib/array/Array#splice - local.tee $45 + local.tee $17 i32.const 0 i32.const 2 i32.const 3 i32.const 4960 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $46 + local.tee $10 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14507,14 +14009,14 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.const 5 i32.const 2 i32.const 3 i32.const 4992 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $47 + local.tee $11 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14532,21 +14034,21 @@ i32.const 5040 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $2 - local.get $1 + local.set $35 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $35 i32.const 7 i32.const 5 call $~lib/array/Array#splice - local.tee $48 + local.tee $9 i32.const 0 i32.const 2 i32.const 3 i32.const 5088 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $49 + local.tee $13 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14558,14 +14060,14 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $35 i32.const 5 i32.const 2 i32.const 3 i32.const 5120 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $50 + local.tee $7 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -14583,10 +14085,10 @@ i32.const 5168 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $1 i32.const 1 call $~lib/array/Array#splice - local.tee $3 + local.tee $0 i32.load offset=12 if i32.const 0 @@ -14596,7 +14098,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $1 i32.load offset=12 if i32.const 0 @@ -14612,37 +14114,37 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $28 i32.load offset=4 - local.tee $0 + local.tee $6 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $0 + local.get $6 i32.const 2 call $std/array/Ref#constructor i32.store offset=4 - local.get $0 + local.get $6 i32.const 3 call $std/array/Ref#constructor i32.store offset=8 - local.get $0 + local.get $6 i32.const 4 call $std/array/Ref#constructor i32.store offset=12 - local.get $0 + local.get $6 i32.const 5 call $std/array/Ref#constructor i32.store offset=16 - local.get $7 - call $~lib/rt/pure/__release local.get $1 + call $~lib/rt/pure/__release + local.get $28 i32.const 2 call $~lib/array/Array#splice - local.set $0 - local.get $3 - call $~lib/rt/pure/__release + local.set $34 local.get $0 + call $~lib/rt/pure/__release + local.get $34 i32.load offset=12 i32.const 2 i32.ne @@ -14654,10 +14156,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $34 i32.const 0 call $~lib/array/Array#__get - local.tee $51 + local.tee $8 i32.load i32.const 3 i32.ne @@ -14669,10 +14171,10 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $34 i32.const 1 call $~lib/array/Array#__get - local.tee $52 + local.tee $2 i32.load i32.const 4 i32.ne @@ -14684,7 +14186,7 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.load offset=12 i32.const 3 i32.ne @@ -14696,10 +14198,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 0 call $~lib/array/Array#__get - local.tee $53 + local.tee $3 i32.load i32.const 1 i32.ne @@ -14711,10 +14213,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 1 call $~lib/array/Array#__get - local.tee $54 + local.tee $5 i32.load i32.const 2 i32.ne @@ -14726,10 +14228,10 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $28 i32.const 2 call $~lib/array/Array#__get - local.tee $55 + local.tee $6 i32.load i32.const 5 i32.ne @@ -14747,38 +14249,106 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $0 i32.load offset=4 - local.tee $3 + local.tee $1 i32.const 1 call $std/array/Ref#constructor i32.store - local.get $3 + local.get $1 i32.const 0 i32.store offset=4 - local.get $3 + local.get $1 i32.const 2 call $std/array/Ref#constructor i32.store offset=8 - local.get $7 - call $~lib/array/Array#splice - local.tee $24 + i32.const 0 + local.get $0 + local.tee $4 i32.load offset=12 - i32.const 1 - i32.ne - if - i32.const 0 - i32.const 1344 - i32.const 439 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $24 + local.tee $33 + local.get $33 i32.const 0 - call $~lib/array/Array#__get - local.tee $3 - local.get $3 + i32.gt_s + select + local.set $21 + i32.const 1 + local.get $33 + local.get $21 + i32.sub + local.tee $0 + local.get $0 + i32.const 1 + i32.gt_s + select + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + local.tee $29 + i32.const 2 + i32.const 11 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $36 + i32.load offset=4 + local.get $4 + i32.load offset=4 + local.tee $1 + local.get $21 + i32.const 2 + i32.shl + i32.add + local.tee $0 + local.get $29 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + local.get $33 + local.get $21 + local.get $29 + i32.add + local.tee $21 + i32.ne + if + local.get $0 + local.get $1 + local.get $21 + i32.const 2 + i32.shl + i32.add + local.get $33 + local.get $21 + i32.sub + i32.const 2 + i32.shl + call $~lib/memory/memory.copy + end + local.get $4 + local.get $33 + local.get $29 + i32.sub + i32.store offset=12 + local.get $36 + i32.load offset=12 + i32.const 1 + i32.ne + if + i32.const 0 + i32.const 1344 + i32.const 439 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $36 + i32.const 0 + call $~lib/array/Array#__get + local.tee $29 + local.get $29 i32.eqz if i32.const 5328 @@ -14799,7 +14369,7 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.load offset=12 i32.const 2 i32.ne @@ -14811,10 +14381,10 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.const 0 call $~lib/array/Array#__get - local.tee $56 + local.tee $1 if i32.const 0 i32.const 1344 @@ -14823,11 +14393,11 @@ call $~lib/builtins/abort unreachable end - local.get $7 + local.get $4 i32.const 1 call $~lib/array/Array#__get - local.tee $4 - local.get $4 + local.tee $21 + local.get $21 i32.eqz if i32.const 5328 @@ -14848,107 +14418,107 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $5 + local.get $35 call $~lib/rt/pure/__release - local.get $6 + local.get $37 call $~lib/rt/pure/__release - local.get $8 + local.get $38 call $~lib/rt/pure/__release - local.get $9 + local.get $39 call $~lib/rt/pure/__release - local.get $10 + local.get $40 call $~lib/rt/pure/__release - local.get $12 + local.get $41 call $~lib/rt/pure/__release - local.get $11 + local.get $42 call $~lib/rt/pure/__release - local.get $13 + local.get $43 call $~lib/rt/pure/__release - local.get $14 + local.get $44 call $~lib/rt/pure/__release - local.get $16 + local.get $45 call $~lib/rt/pure/__release - local.get $17 + local.get $46 call $~lib/rt/pure/__release - local.get $18 + local.get $47 call $~lib/rt/pure/__release - local.get $15 + local.get $48 call $~lib/rt/pure/__release - local.get $21 + local.get $49 call $~lib/rt/pure/__release - local.get $19 + local.get $50 call $~lib/rt/pure/__release - local.get $20 + local.get $51 call $~lib/rt/pure/__release - local.get $22 + local.get $52 call $~lib/rt/pure/__release - local.get $23 + local.get $53 call $~lib/rt/pure/__release - local.get $25 + local.get $54 call $~lib/rt/pure/__release - local.get $26 + local.get $55 call $~lib/rt/pure/__release - local.get $27 + local.get $56 call $~lib/rt/pure/__release - local.get $28 + local.get $57 call $~lib/rt/pure/__release - local.get $29 + local.get $58 call $~lib/rt/pure/__release local.get $30 call $~lib/rt/pure/__release - local.get $33 + local.get $31 call $~lib/rt/pure/__release - local.get $34 + local.get $32 call $~lib/rt/pure/__release - local.get $35 + local.get $22 call $~lib/rt/pure/__release - local.get $36 + local.get $23 call $~lib/rt/pure/__release - local.get $37 + local.get $24 call $~lib/rt/pure/__release - local.get $38 + local.get $25 call $~lib/rt/pure/__release - local.get $39 + local.get $14 call $~lib/rt/pure/__release - local.get $40 + local.get $18 call $~lib/rt/pure/__release - local.get $41 + local.get $19 call $~lib/rt/pure/__release - local.get $42 + local.get $20 call $~lib/rt/pure/__release - local.get $43 + local.get $12 call $~lib/rt/pure/__release - local.get $44 + local.get $15 call $~lib/rt/pure/__release - local.get $45 + local.get $16 call $~lib/rt/pure/__release - local.get $46 + local.get $17 call $~lib/rt/pure/__release - local.get $47 + local.get $10 call $~lib/rt/pure/__release - local.get $48 + local.get $11 call $~lib/rt/pure/__release - local.get $49 + local.get $9 call $~lib/rt/pure/__release - local.get $50 + local.get $13 call $~lib/rt/pure/__release - local.get $51 + local.get $7 call $~lib/rt/pure/__release - local.get $52 + local.get $8 call $~lib/rt/pure/__release - local.get $53 + local.get $2 call $~lib/rt/pure/__release - local.get $54 + local.get $3 call $~lib/rt/pure/__release - local.get $55 + local.get $5 call $~lib/rt/pure/__release - local.get $3 + local.get $6 call $~lib/rt/pure/__release - local.get $56 + local.get $29 call $~lib/rt/pure/__release - local.get $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $21 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 0 @@ -15430,19 +15000,19 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|0 - local.get $2 + local.get $7 i32.const 100 i32.lt_s if global.get $std/array/arr call $~lib/array/Array#pop drop - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|0 end end @@ -15463,62 +15033,62 @@ call $~lib/array/Array#push drop i32.const 0 - local.set $2 + local.set $5 global.get $std/array/arr - local.tee $3 + local.tee $7 i32.load offset=12 - local.tee $6 + local.tee $3 i32.const 2 i32.const 9 i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $8 i32.load offset=4 - local.set $8 + local.set $6 loop $for-loop|050 - local.get $2 - local.get $6 + local.get $5 local.get $3 + local.get $7 i32.load offset=12 - local.tee $9 - local.get $6 - local.get $9 - i32.lt_s + local.tee $0 + local.get $0 + local.get $3 + i32.gt_s select i32.lt_s if - local.get $2 + local.get $5 i32.const 2 i32.shl - local.tee $9 - local.get $3 + local.tee $1 + local.get $7 i32.load offset=4 i32.add i32.load - local.set $10 + local.set $0 i32.const 3 global.set $~argumentsLength - local.get $8 - local.get $9 + local.get $1 + local.get $6 i32.add - local.get $10 - local.get $2 - local.get $3 + local.get $0 + local.get $5 + local.get $7 i32.const 6064 i32.load call_indirect (type $i32_i32_i32_=>_f32) f32.store - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 + local.set $5 br $for-loop|050 end end i32.const 6064 call $~lib/rt/pure/__release - local.get $4 + local.get $8 i32.load offset=12 i32.const 4 i32.ne @@ -15530,7 +15100,7 @@ call $~lib/builtins/abort unreachable end - local.get $4 + local.get $8 i32.const 0 call $~lib/array/Array#__get global.get $std/array/arr @@ -15641,12 +15211,12 @@ i32.const 3 call $~lib/array/Array#push drop - local.get $4 + local.get $8 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 6192 call $~lib/array/Array#filter - local.tee $2 + local.tee $0 i32.load offset=12 i32.const 2 i32.ne @@ -15753,7 +15323,7 @@ i32.const 3 call $~lib/array/Array#push drop - local.get $2 + local.get $0 call $~lib/rt/pure/__release global.get $std/array/arr i32.const 6320 @@ -16068,24 +15638,98 @@ i32.const 7008 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $3 + local.set $18 i32.const 0 global.set $~argumentsLength - local.get $3 + local.get $18 i32.const 7072 call $~lib/array/Array#sort i32.const 7072 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $3 - i32.const 8 - i32.const 2 - i32.const 9 - i32.const 7104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $18 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 2 + i32.const 9 + i32.const 7104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.set $7 + i32.const 0 + local.set $3 + local.get $18 + call $~lib/rt/pure/__retain + local.set $5 + local.get $7 + call $~lib/rt/pure/__retain + local.set $6 + block $folding-inner1 + block $folding-inner0 + local.get $5 + i32.load offset=12 + local.tee $0 + local.get $6 + i32.load offset=12 + i32.ne + br_if $folding-inner0 + local.get $5 + local.get $6 + i32.eq + br_if $folding-inner1 + loop $for-loop|00 + local.get $0 + local.get $3 + i32.gt_s + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.tee $26 + local.get $26 + f32.ne + if (result i32) + local.get $6 + local.get $3 + call $~lib/array/Array#__get + local.tee $26 + local.get $26 + f32.ne + else + i32.const 0 + end + i32.eqz + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.get $6 + local.get $3 + call $~lib/array/Array#__get + f32.ne + br_if $folding-inner0 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|00 + end + end + br $folding-inner1 + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isArraysEqual + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 1 + end i32.eqz if i32.const 0 @@ -16101,24 +15745,98 @@ i32.const 7168 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $4 + local.set $19 i32.const 0 global.set $~argumentsLength - local.get $4 + local.get $19 i32.const 7264 call $~lib/array/Array#sort i32.const 7264 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $4 - i32.const 8 - i32.const 3 - i32.const 10 - i32.const 7296 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $15 - call $std/array/isArraysEqual + block $__inlined_func$std/array/isArraysEqual (result i32) + i32.const 8 + i32.const 3 + i32.const 10 + i32.const 7296 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.set $8 + i32.const 0 + local.set $3 + local.get $19 + call $~lib/rt/pure/__retain + local.set $5 + local.get $8 + call $~lib/rt/pure/__retain + local.set $6 + block $folding-inner11 + block $folding-inner02 + local.get $5 + i32.load offset=12 + local.tee $0 + local.get $6 + i32.load offset=12 + i32.ne + br_if $folding-inner02 + local.get $5 + local.get $6 + i32.eq + br_if $folding-inner11 + loop $for-loop|03 + local.get $0 + local.get $3 + i32.gt_s + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + if (result i32) + local.get $6 + local.get $3 + call $~lib/array/Array#__get + local.tee $27 + local.get $27 + f64.ne + else + i32.const 0 + end + i32.eqz + if + local.get $5 + local.get $3 + call $~lib/array/Array#__get + local.get $6 + local.get $3 + call $~lib/array/Array#__get + f64.ne + br_if $folding-inner02 + end + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|03 + end + end + br $folding-inner11 + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 0 + br $__inlined_func$std/array/isArraysEqual + end + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + i32.const 1 + end i32.eqz if i32.const 0 @@ -16134,23 +15852,23 @@ i32.const 7392 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $5 + local.set $20 i32.const 0 global.set $~argumentsLength - local.get $5 + local.get $20 i32.const 7440 call $~lib/array/Array#sort i32.const 7440 call $~lib/rt/pure/__release call $~lib/rt/pure/__release - local.get $5 + local.get $20 i32.const 5 i32.const 2 i32.const 3 i32.const 7472 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $21 + local.tee $5 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16168,21 +15886,21 @@ i32.const 7520 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $6 + local.set $12 i32.const 0 global.set $~argumentsLength - local.get $6 + local.get $12 i32.const 0 call $~lib/array/Array#sort@varargs call $~lib/rt/pure/__release - local.get $6 + local.get $12 i32.const 5 i32.const 2 i32.const 7 i32.const 7600 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $19 + local.tee $6 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16200,62 +15918,62 @@ i32.const 7648 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $16 + local.set $2 i32.const 1 i32.const 2 i32.const 3 i32.const 7680 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $8 + local.set $15 i32.const 2 i32.const 2 i32.const 3 i32.const 7712 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $9 + local.set $16 i32.const 4 i32.const 2 i32.const 3 i32.const 7744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $17 i32.const 4 i32.const 2 i32.const 3 i32.const 7792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $2 + local.set $14 i32.const 64 call $std/array/createReverseOrderedArray - local.set $12 + local.set $10 i32.const 128 call $std/array/createReverseOrderedArray local.set $11 i32.const 1024 call $std/array/createReverseOrderedArray - local.set $13 + local.set $9 i32.const 10000 call $std/array/createReverseOrderedArray - local.set $14 + local.set $13 i32.const 512 call $std/array/createRandomOrderedArray - local.set $17 - local.get $16 + local.set $3 + local.get $2 call $std/array/assertSortedDefault - local.get $8 + local.get $15 call $std/array/assertSortedDefault - local.get $8 + local.get $15 i32.const 1 i32.const 2 i32.const 3 i32.const 7872 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $1 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16267,16 +15985,16 @@ call $~lib/builtins/abort unreachable end - local.get $9 + local.get $16 call $std/array/assertSortedDefault - local.get $9 + local.get $16 i32.const 2 i32.const 2 i32.const 3 i32.const 7904 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $0 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16288,10 +16006,10 @@ call $~lib/builtins/abort unreachable end - local.get $10 + local.get $17 call $std/array/assertSortedDefault - local.get $10 - local.get $2 + local.get $17 + local.get $14 i32.const 0 call $std/array/isArraysEqual i32.eqz @@ -16303,10 +16021,10 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $10 call $std/array/assertSortedDefault - local.get $12 - local.get $2 + local.get $10 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16321,7 +16039,7 @@ local.get $11 call $std/array/assertSortedDefault local.get $11 - local.get $2 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16333,10 +16051,10 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $9 call $std/array/assertSortedDefault - local.get $13 - local.get $2 + local.get $9 + local.get $14 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16348,10 +16066,10 @@ call $~lib/builtins/abort unreachable end - local.get $14 + local.get $13 call $std/array/assertSortedDefault + local.get $13 local.get $14 - local.get $2 i32.const 4 call $std/array/isArraysEqual i32.eqz @@ -16363,81 +16081,233 @@ call $~lib/builtins/abort unreachable end - local.get $17 - call $std/array/assertSortedDefault local.get $3 - call $~lib/rt/pure/__release + call $std/array/assertSortedDefault local.get $18 call $~lib/rt/pure/__release - local.get $4 + local.get $7 call $~lib/rt/pure/__release - local.get $15 + local.get $19 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $21 + local.get $12 call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $19 + local.get $2 + call $~lib/rt/pure/__release + local.get $15 call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $8 + local.get $17 call $~lib/rt/pure/__release - local.get $9 + local.get $14 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $12 - call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release - local.get $13 + local.get $9 call $~lib/rt/pure/__release - local.get $14 + local.get $13 call $~lib/rt/pure/__release - local.get $17 + local.get $3 call $~lib/rt/pure/__release - local.get $20 + local.get $1 call $~lib/rt/pure/__release - local.get $22 + local.get $0 call $~lib/rt/pure/__release i32.const 64 call $std/array/createRandomOrderedArray - local.set $2 + local.set $1 i32.const 257 call $std/array/createRandomOrderedArray - local.set $3 - local.get $2 + local.set $0 + local.get $1 i32.const 7936 call $std/array/assertSorted - local.get $2 + local.get $1 i32.const 7968 call $std/array/assertSorted + local.get $0 + i32.const 8000 + call $std/array/assertSorted + local.get $0 + i32.const 8032 + call $std/array/assertSorted + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + local.set $7 + i32.const 16 + i32.const 22 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $5 + i32.const 0 + i32.store + local.get $5 + i32.const 0 + i32.store offset=4 + local.get $5 + i32.const 0 + i32.store offset=8 + local.get $5 + i32.const 0 + i32.store offset=12 + i32.const 8 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $0 + i32.const 0 + i32.const 8 + call $~lib/memory/memory.fill + local.get $0 + local.tee $1 + local.get $5 + i32.load + local.tee $6 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $6 + call $~lib/rt/pure/__release + end + local.get $5 + local.get $1 + i32.store + local.get $5 + local.get $0 + i32.store offset=4 + local.get $5 + i32.const 8 + i32.store offset=8 + local.get $5 + i32.const 2 + i32.store offset=12 + loop $for-loop|06 + local.get $7 + i32.const 2 + i32.lt_s + if + i32.const 1 + call $~lib/array/Array#constructor + local.tee $0 + i32.const 0 + i32.const 1 + local.get $7 + i32.sub + call $~lib/array/Array#__set + local.get $5 + local.get $7 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $7 + i32.const 1 + i32.add + local.set $7 + br $for-loop|06 + end + end + local.get $5 + i32.const 8064 + call $std/array/assertSorted<~lib/array/Array> + local.get $5 + call $~lib/rt/pure/__release + i32.const 0 + local.set $5 + i32.const 16 + i32.const 25 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $3 + i32.const 0 + i32.store + local.get $3 + i32.const 0 + i32.store offset=4 + local.get $3 + i32.const 0 + i32.store offset=8 + local.get $3 + i32.const 0 + i32.store offset=12 + i32.const 2048 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $1 + i32.const 0 + i32.const 2048 + call $~lib/memory/memory.fill + local.get $1 + local.set $0 + local.get $1 local.get $3 - i32.const 8000 - call $std/array/assertSorted + i32.load + local.tee $6 + i32.ne + if + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + end local.get $3 - i32.const 8032 - call $std/array/assertSorted - local.get $2 - call $~lib/rt/pure/__release + local.get $0 + i32.store + local.get $3 + local.get $1 + i32.store offset=4 + local.get $3 + i32.const 2048 + i32.store offset=8 + local.get $3 + i32.const 512 + i32.store offset=12 + loop $for-loop|04 + local.get $5 + i32.const 512 + i32.lt_s + if + i32.const 4 + i32.const 24 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 511 + local.get $5 + i32.sub + i32.store + local.get $3 + local.get $5 + local.get $0 + call $~lib/array/Array<~lib/array/Array>#__set + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + i32.const 1 + i32.add + local.set $5 + br $for-loop|04 + end + end local.get $3 - call $~lib/rt/pure/__release - call $std/array/createReverseOrderedNestedArray - local.tee $2 - i32.const 8064 - call $std/array/assertSorted<~lib/array/Array> - local.get $2 - call $~lib/rt/pure/__release - call $std/array/createReverseOrderedElementsArray - local.tee $2 i32.const 8096 call $std/array/assertSorted<~lib/array/Array> - local.get $2 + local.get $3 call $~lib/rt/pure/__release i32.const 7 i32.const 2 @@ -16445,85 +16315,85 @@ i32.const 8288 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $5 + local.set $11 i32.const 7 i32.const 2 i32.const 27 i32.const 8336 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $13 i32.const 1 global.set $~argumentsLength block $__inlined_func$std/array/isSorted<~lib/string/String|null> (result i32) - local.get $5 + local.get $11 call $~lib/rt/pure/__retain - local.tee $11 + local.tee $3 i32.const 8384 call $~lib/rt/pure/__retain - local.tee $12 + local.tee $5 call $~lib/array/Array<~lib/array/Array>#sort - local.tee $13 + local.tee $6 call $~lib/rt/pure/__retain - local.set $3 - local.get $12 + local.set $10 + local.get $5 call $~lib/rt/pure/__retain - local.set $6 + local.set $7 i32.const 1 - local.set $4 - local.get $3 + local.set $9 + local.get $10 i32.load offset=12 - local.set $14 - loop $for-loop|00 - local.get $4 - local.get $14 - i32.lt_s + local.set $0 + loop $for-loop|05 + local.get $0 + local.get $9 + i32.gt_s if - local.get $3 - local.get $4 + local.get $10 + local.get $9 i32.const 1 i32.sub call $~lib/array/Array#__get local.set $8 - local.get $3 - local.get $4 + local.get $10 + local.get $9 call $~lib/array/Array#__get - local.set $9 + local.set $2 i32.const 2 global.set $~argumentsLength local.get $8 - local.get $9 - local.get $6 + local.get $2 + local.get $7 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.gt_s if - local.get $3 + local.get $10 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $2 call $~lib/rt/pure/__release i32.const 0 br $__inlined_func$std/array/isSorted<~lib/string/String|null> end local.get $8 call $~lib/rt/pure/__release - local.get $9 + local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $9 i32.const 1 i32.add - local.set $4 - br $for-loop|00 + local.set $9 + br $for-loop|05 end end - local.get $3 + local.get $10 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release i32.const 1 end @@ -16536,16 +16406,16 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $6 call $~lib/rt/pure/__release - local.get $11 + local.get $3 call $~lib/rt/pure/__release - local.get $12 + local.get $5 call $~lib/rt/pure/__release i32.const 8384 call $~lib/rt/pure/__release - local.get $5 - local.get $10 + local.get $11 + local.get $13 call $std/array/isArraysEqual<~lib/string/String|null> i32.eqz if @@ -16557,46 +16427,115 @@ unreachable end i32.const 0 - local.set $2 + local.set $5 i32.const 0 i32.const 400 call $~lib/array/Array<~lib/string/String>#constructor - local.set $3 - loop $for-loop|06 - local.get $2 + local.set $2 + loop $for-loop|07 + local.get $5 i32.const 400 i32.lt_s if - local.get $3 - local.get $2 call $~lib/math/NativeMath.random f64.const 32 f64.mul i32.trunc_f64_s - call $std/array/createRandomString - local.tee $4 + local.set $7 + i32.const 0 + local.set $9 + i32.const 8256 + local.set $3 + loop $for-loop|08 + local.get $7 + local.get $9 + i32.gt_s + if + local.get $3 + local.tee $1 + local.tee $0 + block $__inlined_func$~lib/string/String#charAt (result i32) + i32.const 8256 + call $~lib/math/NativeMath.random + i32.const 6812 + i32.load + i32.const 1 + i32.shr_u + f64.convert_i32_s + f64.mul + f64.floor + i32.trunc_f64_s + local.tee $8 + i32.const 6812 + i32.load + i32.const 1 + i32.shr_u + i32.ge_u + br_if $__inlined_func$~lib/string/String#charAt + drop + i32.const 2 + i32.const 1 + call $~lib/rt/pure/__new + local.tee $3 + local.get $8 + i32.const 1 + i32.shl + i32.const 6816 + i32.add + i32.load16_u + i32.store16 + local.get $3 + call $~lib/rt/pure/__retain + end + local.tee $6 + call $~lib/string/String.__concat + local.tee $8 + local.tee $3 + local.get $0 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $1 + call $~lib/rt/pure/__release + end + local.get $6 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + local.get $9 + i32.const 1 + i32.add + local.set $9 + br $for-loop|08 + end + end + local.get $2 + local.get $5 + local.get $3 call $~lib/array/Array<~lib/array/Array>#__set - local.get $4 + local.get $3 call $~lib/rt/pure/__release - local.get $2 + local.get $5 i32.const 1 i32.add - local.set $2 - br $for-loop|06 + local.set $5 + br $for-loop|07 end end i32.const 1 global.set $~argumentsLength - local.get $3 + local.get $2 i32.const 8448 call $std/array/assertSorted<~lib/array/Array> i32.const 8448 call $~lib/rt/pure/__release - local.get $5 + local.get $11 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $3 + local.get $2 call $~lib/rt/pure/__release i32.const 2 i32.const 0 @@ -16604,15 +16543,15 @@ i32.const 8480 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $12 i32.load offset=4 - local.get $2 + local.get $12 i32.load offset=12 call $~lib/util/string/joinBooleanArray - local.set $4 + local.set $16 i32.const 8576 call $~lib/rt/pure/__release - local.get $4 + local.get $16 i32.const 8608 call $~lib/string/String.__eq i32.eqz @@ -16630,10 +16569,10 @@ i32.const 8656 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $11 i32.const 8256 call $~lib/array/Array#join - local.tee $10 + local.tee $9 i32.const 9008 call $~lib/string/String.__eq i32.eqz @@ -16651,10 +16590,10 @@ i32.const 9040 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $13 i32.const 9072 call $~lib/array/Array#join - local.tee $11 + local.tee $7 i32.const 9008 call $~lib/string/String.__eq i32.eqz @@ -16672,10 +16611,10 @@ i32.const 9104 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $13 + local.tee $8 i32.const 9136 call $~lib/array/Array#join - local.tee $14 + local.tee $2 i32.const 9168 call $~lib/string/String.__eq i32.eqz @@ -16693,15 +16632,15 @@ i32.const 9248 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $15 i32.load offset=4 - local.get $3 + local.get $15 i32.load offset=12 call $~lib/util/string/joinFloatArray - local.set $6 + local.set $0 i32.const 9328 call $~lib/rt/pure/__release - local.get $6 + local.get $0 i32.const 10480 call $~lib/string/String.__eq i32.eqz @@ -16719,10 +16658,10 @@ i32.const 10624 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $3 i32.const 8256 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $17 + local.tee $5 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -16740,22 +16679,22 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $17 i32.load offset=4 - local.tee $8 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $8 + local.get $1 i32.const 0 i32.store offset=4 - local.get $8 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=8 - local.get $5 + local.get $17 call $~lib/array/Array#join - local.tee $18 + local.tee $6 i32.const 10720 call $~lib/string/String.__eq i32.eqz @@ -16773,19 +16712,19 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $10 i32.load offset=4 - local.tee $15 + local.tee $1 i32.const 0 call $std/array/Ref#constructor i32.store - local.get $15 + local.get $1 i32.const 0 call $std/array/Ref#constructor i32.store offset=4 - local.get $8 + local.get $10 call $~lib/array/Array#join - local.tee $15 + local.tee $1 i32.const 10816 call $~lib/string/String.__eq i32.eqz @@ -16797,37 +16736,37 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $12 + call $~lib/rt/pure/__release + local.get $16 call $~lib/rt/pure/__release - local.get $4 + local.get $11 call $~lib/rt/pure/__release local.get $9 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $12 + local.get $7 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release - local.get $13 + local.get $2 call $~lib/rt/pure/__release - local.get $14 + local.get $15 call $~lib/rt/pure/__release - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $3 call $~lib/rt/pure/__release - local.get $16 + local.get $5 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $18 + local.get $6 call $~lib/rt/pure/__release - local.get $8 + local.get $10 call $~lib/rt/pure/__release - local.get $15 + local.get $1 call $~lib/rt/pure/__release i32.const 0 i32.const 2 @@ -16835,33 +16774,33 @@ i32.const 10912 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $10 + local.set $14 i32.const 1 i32.const 2 i32.const 3 i32.const 10944 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $12 + local.set $18 i32.const 2 i32.const 2 i32.const 3 i32.const 10976 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $11 + local.set $19 i32.const 4 i32.const 2 i32.const 3 i32.const 11008 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $13 - local.get $10 + local.set $20 + local.get $14 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.get $2 + local.tee $0 + local.get $0 i32.const 8256 call $~lib/string/String.__eq i32.eqz @@ -16873,12 +16812,12 @@ call $~lib/builtins/abort unreachable end - local.get $12 + local.get $18 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $23 - local.get $2 + local.tee $0 + local.set $16 + local.get $0 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -16890,12 +16829,12 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $19 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $25 - local.get $2 + local.tee $0 + local.set $17 + local.get $0 i32.const 11056 call $~lib/string/String.__eq i32.eqz @@ -16907,12 +16846,12 @@ call $~lib/builtins/abort unreachable end - local.get $13 + local.get $20 i32.const 8576 call $~lib/array/Array#join - local.tee $2 - local.set $26 - local.get $2 + local.tee $0 + local.set $10 + local.get $0 i32.const 11088 call $~lib/string/String.__eq i32.eqz @@ -16930,15 +16869,15 @@ i32.const 11136 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $30 i32.load offset=4 - local.get $2 + local.get $30 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $14 + local.set $3 i32.const 8576 call $~lib/rt/pure/__release - local.get $14 + local.get $3 i32.const 11168 call $~lib/string/String.__eq i32.eqz @@ -16956,15 +16895,15 @@ i32.const 11200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $3 + local.tee $31 i32.load offset=4 - local.get $3 + local.get $31 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $16 + local.set $12 i32.const 8576 call $~lib/rt/pure/__release - local.get $16 + local.get $12 i32.const 11232 call $~lib/string/String.__eq i32.eqz @@ -16982,15 +16921,15 @@ i32.const 11280 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $32 i32.load offset=4 - local.get $4 + local.get $32 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $17 + local.set $5 i32.const 8576 call $~lib/rt/pure/__release - local.get $17 + local.get $5 i32.const 11328 call $~lib/string/String.__eq i32.eqz @@ -17008,15 +16947,15 @@ i32.const 11408 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $22 i32.load offset=4 - local.get $5 + local.get $22 i32.load offset=12 call $~lib/util/string/joinIntegerArray - local.set $18 + local.set $6 i32.const 8576 call $~lib/rt/pure/__release - local.get $18 + local.get $6 i32.const 11472 call $~lib/string/String.__eq i32.eqz @@ -17034,12 +16973,12 @@ i32.const 11584 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $27 + local.tee $11 i32.const 8576 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $6 - local.set $28 - local.get $6 + local.tee $0 + local.set $9 + local.get $0 i32.const 11632 call $~lib/string/String.__eq i32.eqz @@ -17057,12 +16996,12 @@ i32.const 11744 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $13 i32.const 8576 call $~lib/array/Array<~lib/string/String|null>#join - local.tee $6 - local.set $30 - local.get $6 + local.tee $0 + local.set $7 + local.get $0 i32.const 11792 call $~lib/string/String.__eq i32.eqz @@ -17080,9 +17019,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $23 i32.load offset=4 - local.tee $8 + local.tee $0 i32.const 2 i32.const 2 i32.const 3 @@ -17090,7 +17029,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $8 + local.get $0 i32.const 2 i32.const 2 i32.const 3 @@ -17098,15 +17037,15 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $6 + local.get $23 i32.load offset=4 - local.get $6 + local.get $23 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $15 + local.set $1 i32.const 8576 call $~lib/rt/pure/__release - local.get $15 + local.get $1 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -17124,9 +17063,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $24 i32.load offset=4 - local.tee $9 + local.tee $0 i32.const 2 i32.const 0 i32.const 6 @@ -17134,7 +17073,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $9 + local.get $0 i32.const 2 i32.const 0 i32.const 6 @@ -17142,15 +17081,15 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $8 + local.get $24 i32.load offset=4 - local.get $8 + local.get $24 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array> - local.set $21 + local.set $0 i32.const 8576 call $~lib/rt/pure/__release - local.get $21 + local.get $0 i32.const 11888 call $~lib/string/String.__eq i32.eqz @@ -17168,7 +17107,7 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $25 i32.load offset=4 i32.const 1 i32.const 2 @@ -17176,7 +17115,7 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $2 i32.load offset=4 i32.const 1 i32.const 2 @@ -17185,17 +17124,17 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $20 + local.get $2 i32.store - local.get $9 + local.get $25 i32.load offset=4 - local.get $9 + local.get $25 i32.load offset=12 call $~lib/util/string/joinReferenceArray<~lib/array/Array<~lib/array/Array>> - local.set $20 + local.set $2 i32.const 8576 call $~lib/rt/pure/__release - local.get $20 + local.get $2 i32.const 10592 call $~lib/string/String.__eq i32.eqz @@ -17207,50 +17146,50 @@ call $~lib/builtins/abort unreachable end - local.get $10 - call $~lib/rt/pure/__release - local.get $12 + local.get $14 call $~lib/rt/pure/__release - local.get $11 + local.get $18 call $~lib/rt/pure/__release - local.get $13 + local.get $19 call $~lib/rt/pure/__release + local.get $20 call $~lib/rt/pure/__release - local.get $23 call $~lib/rt/pure/__release - local.get $25 + local.get $16 call $~lib/rt/pure/__release - local.get $26 + local.get $17 call $~lib/rt/pure/__release - local.get $2 + local.get $10 call $~lib/rt/pure/__release - local.get $14 + local.get $30 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $16 + local.get $31 call $~lib/rt/pure/__release - local.get $4 + local.get $12 call $~lib/rt/pure/__release - local.get $17 + local.get $32 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $18 + local.get $22 call $~lib/rt/pure/__release - local.get $27 + local.get $6 call $~lib/rt/pure/__release - local.get $28 + local.get $11 call $~lib/rt/pure/__release - local.get $29 + local.get $9 call $~lib/rt/pure/__release - local.get $30 + local.get $13 call $~lib/rt/pure/__release - local.get $15 + local.get $7 call $~lib/rt/pure/__release - local.get $21 + local.get $1 call $~lib/rt/pure/__release - local.get $20 + local.get $0 + call $~lib/rt/pure/__release + local.get $2 call $~lib/rt/pure/__release global.get $std/array/arr call $~lib/rt/pure/__release @@ -17260,9 +17199,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $5 + local.tee $0 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 3 @@ -17270,7 +17209,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17278,7 +17217,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17286,7 +17225,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 3 @@ -17294,9 +17233,9 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $5 + local.get $0 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $10 + local.tee $3 i32.load offset=12 i32.const 10 i32.ne @@ -17309,16 +17248,16 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|1 - local.get $2 + local.get $7 i32.const 10 i32.lt_s if - local.get $10 - local.get $2 + local.get $3 + local.get $7 call $~lib/array/Array#__get - local.get $2 + local.get $7 i32.ne if i32.const 0 @@ -17328,10 +17267,10 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|1 end end @@ -17341,9 +17280,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $12 + local.tee $5 i32.load offset=4 - local.tee $2 + local.tee $1 i32.const 1 i32.const 2 i32.const 27 @@ -17351,7 +17290,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 27 @@ -17359,7 +17298,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $1 i32.const 3 i32.const 2 i32.const 27 @@ -17367,7 +17306,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=8 - local.get $2 + local.get $1 i32.const 1 i32.const 2 i32.const 27 @@ -17375,17 +17314,17 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=12 - local.get $12 + local.get $5 call $~lib/array/Array<~lib/array/Array<~lib/string/String|null>>#flat - local.set $3 + local.set $8 i32.const 8 i32.const 2 i32.const 27 i32.const 12512 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.set $4 - local.get $3 + local.set $2 + local.get $8 i32.load offset=12 i32.const 8 i32.ne @@ -17398,21 +17337,21 @@ unreachable end i32.const 0 - local.set $2 + local.set $7 loop $for-loop|2 + local.get $7 local.get $2 - local.get $4 i32.load offset=12 i32.lt_s if - local.get $3 - local.get $2 + local.get $8 + local.get $7 call $~lib/array/Array#__get - local.tee $11 - local.get $4 + local.tee $6 local.get $2 + local.get $7 call $~lib/array/Array#__get - local.tee $13 + local.tee $1 call $~lib/string/String.__eq i32.eqz if @@ -17423,14 +17362,14 @@ call $~lib/builtins/abort unreachable end - local.get $11 + local.get $6 call $~lib/rt/pure/__release - local.get $13 + local.get $1 call $~lib/rt/pure/__release - local.get $2 + local.get $7 i32.const 1 i32.add - local.set $2 + local.set $7 br $for-loop|2 end end @@ -17440,9 +17379,9 @@ i32.const 0 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $2 + local.tee $6 i32.load offset=4 - local.tee $11 + local.tee $1 i32.const 0 i32.const 2 i32.const 3 @@ -17450,7 +17389,7 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store - local.get $11 + local.get $1 i32.const 0 i32.const 2 i32.const 3 @@ -17458,9 +17397,9 @@ call $~lib/rt/__newArray call $~lib/rt/pure/__retain i32.store offset=4 - local.get $2 + local.get $6 call $~lib/array/Array<~lib/array/Array>#flat - local.tee $11 + local.tee $1 i32.load offset=12 if i32.const 0 @@ -17470,109 +17409,34 @@ call $~lib/builtins/abort unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $11 + local.get $6 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $7 + local.get $28 call $~lib/rt/pure/__release - local.get $24 + local.get $34 call $~lib/rt/pure/__release - local.get $6 + local.get $4 call $~lib/rt/pure/__release - local.get $8 + local.get $36 call $~lib/rt/pure/__release - local.get $9 + local.get $23 call $~lib/rt/pure/__release - local.get $5 + local.get $24 call $~lib/rt/pure/__release - local.get $10 + local.get $25 call $~lib/rt/pure/__release - local.get $12 + local.get $0 call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - local.get $4 + local.get $5 + call $~lib/rt/pure/__release + local.get $8 call $~lib/rt/pure/__release - ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - i32.eqz - if - i32.const 16 - i32.const 7 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 268435455 - i32.gt_u - if - i32.const 1056 - i32.const 1104 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - i32.shl - local.tee $4 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $2 - i32.const 0 - local.get $4 - call $~lib/memory/memory.fill - local.get $2 - local.set $3 - local.get $2 - local.get $0 - i32.load - local.tee $5 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 - local.get $5 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $3 - i32.store - local.get $0 local.get $2 - i32.store offset=4 - local.get $0 - local.get $4 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 + call $~lib/rt/pure/__release ) (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) local.get $0 @@ -17668,9 +17532,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -17707,82 +17571,6 @@ call $~lib/rt/pure/__release local.get $4 ) - (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 2 - i32.const 7 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $2 - i32.const 2 - i32.shl - call $~lib/memory/memory.copy - local.get $3 - ) (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -17881,77 +17669,6 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/array/Array#constructor (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.eqz - if - i32.const 16 - i32.const 6 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - local.get $0 - i32.const 0 - i32.store offset=12 - local.get $1 - i32.const 1073741820 - i32.gt_u - if - i32.const 1056 - i32.const 1104 - i32.const 57 - i32.const 60 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $2 - i32.const 0 - local.get $1 - call $~lib/memory/memory.fill - local.get $2 - local.set $3 - local.get $2 - local.get $0 - i32.load - local.tee $4 - i32.ne - if - local.get $3 - call $~lib/rt/pure/__retain - local.set $3 - local.get $4 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $3 - i32.store - local.get $0 - local.get $2 - i32.store offset=4 - local.get $0 - local.get $1 - i32.store offset=8 - local.get $0 - local.get $1 - i32.store offset=12 - local.get $0 - ) (func $~lib/array/Array#set:length (param $0 i32) (param $1 i32) local.get $0 i32.load offset=12 @@ -17980,9 +17697,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18032,9 +17749,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18291,9 +18008,9 @@ local.get $1 i32.sub local.tee $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select call $~lib/memory/memory.copy local.get $0 @@ -18343,9 +18060,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18395,9 +18112,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $5 local.get $3 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -18487,9 +18204,9 @@ local.get $0 i32.load offset=12 local.tee $3 - local.get $4 local.get $3 - i32.lt_s + local.get $4 + i32.gt_s select i32.lt_s if @@ -18551,160 +18268,6 @@ i32.store offset=12 local.get $2 ) - (func $~lib/array/Array#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - local.get $0 - i32.load offset=12 - local.set $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.set $1 - local.get $2 - i32.const 0 - i32.lt_s - if (result i32) - local.get $2 - local.get $3 - i32.add - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - else - local.get $2 - local.get $3 - local.get $2 - local.get $3 - i32.lt_s - select - end - local.get $1 - i32.sub - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 0 - i32.const 6 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.get $1 - i32.add - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - ) - (func $~lib/array/Array#splice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $2 - local.get $0 - i32.load offset=12 - local.tee $3 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $1 - local.get $3 - i32.add - local.tee $1 - i32.const 0 - local.get $1 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $3 - local.get $1 - local.get $3 - i32.lt_s - select - end - local.tee $1 - i32.sub - local.tee $4 - local.get $2 - local.get $4 - i32.lt_s - select - local.tee $2 - i32.const 0 - local.get $2 - i32.const 0 - i32.gt_s - select - local.tee $2 - i32.const 0 - i32.const 6 - i32.const 0 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - i32.load offset=4 - local.get $0 - i32.load offset=4 - local.tee $5 - local.get $1 - i32.add - local.tee $6 - local.get $2 - call $~lib/memory/memory.copy - local.get $3 - local.get $1 - local.get $2 - i32.add - local.tee $1 - i32.ne - if - local.get $6 - local.get $1 - local.get $5 - i32.add - local.get $3 - local.get $1 - i32.sub - call $~lib/memory/memory.copy - end - local.get $0 - local.get $3 - local.get $2 - i32.sub - i32.store offset=12 - local.get $4 - ) (func $~lib/array/Array#reverse (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -18724,9 +18287,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load8_u @@ -18739,96 +18302,19 @@ local.get $3 i32.store8 local.get $2 - i32.const 1 - i32.add - local.set $2 - local.get $1 - i32.const 1 - i32.sub - local.set $1 - br $while-continue|0 - end - end - end - local.get $0 - call $~lib/rt/pure/__retain - ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $4 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $4 - i32.add - i32.load8_u - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.add - i32.load8_u - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $i32_i32_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.add - local.get $7 - i32.store8 - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.add - local.get $6 - i32.store8 - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 + i32.const 1 + i32.add + local.set $2 + local.get $1 + i32.const 1 + i32.sub + local.set $1 + br $while-continue|0 + end end end - local.get $5 - call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__retain ) (func $~lib/util/sort/weakHeapSort (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) @@ -18972,6 +18458,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -18989,8 +18476,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -19077,78 +18563,150 @@ (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) + local.get $1 + call $~lib/rt/pure/__retain + local.set $5 block $folding-inner0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $4 local.get $0 i32.load offset=12 - local.tee $2 + local.tee $1 i32.const 1 i32.le_s br_if $folding-inner0 local.get $0 i32.load offset=4 - local.set $1 - local.get $2 + local.set $4 + local.get $1 i32.const 2 i32.eq if - local.get $1 + local.get $4 i32.load8_u offset=1 local.set $2 - local.get $1 + local.get $4 i32.load8_u - local.set $3 + local.set $1 i32.const 2 global.set $~argumentsLength local.get $2 - local.get $3 - local.get $4 + local.get $1 + local.get $5 i32.load call_indirect (type $i32_i32_=>_i32) i32.const 0 i32.lt_s if + local.get $4 local.get $1 - local.get $3 i32.store8 offset=1 - local.get $1 + local.get $4 local.get $2 i32.store8 end br $folding-inner0 end - local.get $2 - local.set $3 - local.get $4 + local.get $5 call $~lib/rt/pure/__retain - local.set $2 - local.get $3 + local.set $7 + local.get $1 i32.const 256 i32.lt_s if local.get $1 - local.get $3 - local.get $2 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $7 + call $~lib/rt/pure/__retain + local.set $8 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $4 + local.get $6 + i32.add + i32.load8_u + local.set $9 + local.get $6 + i32.const 1 + i32.sub + local.set $2 + loop $while-continue|1 + local.get $2 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $2 + local.get $4 + i32.add + i32.load8_u + local.set $10 + i32.const 2 + global.set $~argumentsLength + local.get $9 + local.get $10 + local.get $8 + i32.load + call_indirect (type $i32_i32_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $2 + local.tee $1 + i32.const 1 + i32.sub + local.set $2 + local.get $4 + local.get $1 + i32.const 1 + i32.add + i32.add + local.get $10 + i32.store8 + br $while-continue|1 + end + end + end + local.get $4 + local.get $2 + i32.const 1 + i32.add + i32.add + local.get $9 + i32.store8 + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $8 + call $~lib/rt/pure/__release else + local.get $4 local.get $1 - local.get $3 - local.get $2 + local.get $7 call $~lib/util/sort/weakHeapSort end - local.get $2 + local.get $7 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release return end local.get $0 call $~lib/rt/pure/__retain - local.get $4 + local.get $5 call $~lib/rt/pure/__release ) (func $~lib/array/Array<~lib/string/String>#fill (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) @@ -19179,9 +18737,9 @@ else local.get $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select end local.set $2 @@ -19201,16 +18759,16 @@ else local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select end local.set $1 loop $for-loop|0 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s if local.get $4 local.get $5 @@ -19390,9 +18948,9 @@ i32.load offset=4 local.set $0 loop $for-loop|0 - local.get $4 local.get $2 - i32.lt_u + local.get $4 + i32.gt_u if local.get $3 local.get $4 @@ -19544,9 +19102,9 @@ i32.add i32.lt_s i32.const 0 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select if local.get $2 @@ -19710,9 +19268,9 @@ local.get $0 i32.load offset=12 local.tee $1 - local.get $5 local.get $1 - i32.lt_s + local.get $5 + i32.gt_s select i32.lt_s if @@ -20046,9 +19604,9 @@ i32.add local.set $1 loop $while-continue|0 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if local.get $2 i32.load @@ -20189,8 +19747,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1216 @@ -20223,6 +19780,10 @@ call $~lib/rt/pure/decrement ) (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) block $1of1 block $0of1 block $outOfRange @@ -20235,8 +19796,74 @@ local.set $1 end local.get $0 + i32.eqz + if + i32.const 16 + i32.const 7 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 268435455 + i32.gt_u + if + i32.const 1056 + i32.const 1104 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + i32.const 2 + i32.shl + local.tee $4 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $2 + i32.const 0 + local.get $4 + call $~lib/memory/memory.fill + local.get $2 + local.set $3 + local.get $2 + local.get $0 + i32.load + local.tee $5 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $5 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $3 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + local.get $4 + i32.store offset=8 + local.get $0 local.get $1 - call $~lib/array/Array#constructor + i32.store offset=12 + local.get $0 ) (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 @@ -20336,9 +19963,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 @@ -20395,6 +20022,7 @@ call $~lib/array/Array#copyWithin ) (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) block $2of2 block $1of2 block $0of2 @@ -20411,9 +20039,78 @@ local.set $2 end local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $3 + i32.const 2 + i32.const 7 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 + local.get $0 + i32.load offset=4 local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $3 + i32.const 2 + i32.shl + call $~lib/memory/memory.copy local.get $2 - call $~lib/array/Array#slice ) (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) block $1of1 @@ -20451,6 +20148,9 @@ call $~lib/array/Array#join ) (func $~lib/array/Array#constructor@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) block $1of1 block $0of1 block $outOfRange @@ -20463,8 +20163,72 @@ local.set $1 end local.get $0 + i32.eqz + if + i32.const 16 + i32.const 6 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + local.get $0 + i32.const 0 + i32.store offset=12 + local.get $1 + i32.const 1073741820 + i32.gt_u + if + i32.const 1056 + i32.const 1104 + i32.const 57 + i32.const 60 + call $~lib/builtins/abort + unreachable + end + local.get $1 + local.tee $2 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $1 + i32.const 0 + local.get $2 + call $~lib/memory/memory.fill + local.get $1 + local.set $3 + local.get $1 + local.get $0 + i32.load + local.tee $4 + i32.ne + if + local.get $3 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $3 + i32.store + local.get $0 local.get $1 - call $~lib/array/Array#constructor + i32.store offset=4 + local.get $0 + local.get $2 + i32.store offset=8 + local.get $0 + local.get $2 + i32.store offset=12 + local.get $0 ) (func $~lib/array/Array#fill@varargs (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32) (result i32) block $2of2 @@ -20564,9 +20328,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 @@ -20623,6 +20387,7 @@ call $~lib/array/Array#copyWithin ) (func $~lib/array/Array#slice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) block $2of2 block $1of2 block $0of2 @@ -20639,11 +20404,80 @@ local.set $2 end local.get $0 + i32.load offset=12 + local.set $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.set $1 + local.get $2 + i32.const 0 + i32.lt_s + if (result i32) + local.get $2 + local.get $3 + i32.add + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + else + local.get $2 + local.get $3 + local.get $2 + local.get $3 + i32.lt_s + select + end + local.get $1 + i32.sub + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $3 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=4 local.get $1 + local.get $0 + i32.load offset=4 + i32.add + local.get $3 + call $~lib/memory/memory.copy local.get $2 - call $~lib/array/Array#slice ) (func $~lib/array/Array#splice@varargs (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) block $1of1 block $0of1 block $outOfRange @@ -20657,10 +20491,82 @@ i32.const 2147483647 local.set $2 end + local.get $2 + local.get $0 + i32.load offset=12 + local.tee $3 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $1 + local.get $3 + i32.add + local.tee $1 + i32.const 0 + local.get $1 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $3 + local.get $1 + local.get $3 + i32.lt_s + select + end + local.tee $1 + i32.sub + local.tee $4 + local.get $2 + local.get $4 + i32.lt_s + select + local.tee $2 + i32.const 0 + local.get $2 + i32.const 0 + i32.gt_s + select + local.tee $2 + i32.const 0 + i32.const 6 + i32.const 0 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=4 + local.get $1 local.get $0 + i32.load offset=4 + local.tee $5 + i32.add + local.tee $6 + local.get $2 + call $~lib/memory/memory.copy + local.get $3 local.get $1 local.get $2 - call $~lib/array/Array#splice + i32.add + local.tee $1 + i32.ne + if + local.get $6 + local.get $1 + local.get $5 + i32.add + local.get $3 + local.get $1 + i32.sub + call $~lib/memory/memory.copy + end + local.get $0 + local.get $3 + local.get $2 + i32.sub + i32.store offset=12 + local.get $4 ) (func $~lib/array/Array#sort@varargs (param $0 i32) (param $1 i32) (result i32) (local $2 i32) @@ -20821,9 +20727,9 @@ i32.const 1 i32.sub local.get $2 - local.get $2 local.get $0 - i32.ge_s + local.get $2 + i32.le_s select local.get $2 i32.const 0 diff --git a/tests/compiler/std/arraybuffer.optimized.wat b/tests/compiler/std/arraybuffer.optimized.wat index 615ce47e6a..f3d2afb377 100644 --- a/tests/compiler/std/arraybuffer.optimized.wat +++ b/tests/compiler/std/arraybuffer.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -579,85 +579,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1488 - i32.const 0 - i32.store - i32.const 3056 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1488 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1488 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1488 - i32.const 3060 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1488 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -787,86 +708,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -970,12 +815,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -987,10 +832,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1007,17 +921,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1488 + i32.const 0 + i32.store + i32.const 3056 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1488 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1488 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1488 + i32.const 3060 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1488 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1512,11 +1498,11 @@ local.get $0 i32.const 0 i32.store offset=8 - i32.const 1 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if i32.const 1056 i32.const 1104 @@ -1846,11 +1832,11 @@ local.set $7 local.get $5 i32.load - local.tee $1 + local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $0 + local.tee $1 local.set $8 i32.const 12 i32.const 15 @@ -1865,17 +1851,17 @@ local.get $3 i32.const 0 i32.store offset=8 - local.get $0 - i32.const 1073741820 - i32.gt_u - local.get $0 local.get $1 + local.get $0 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 i32.gt_u + local.get $1 + i32.const 1073741820 + i32.gt_u i32.or if i32.const 1056 @@ -1998,8 +1984,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/std/dataview.optimized.wat b/tests/compiler/std/dataview.optimized.wat index 6fd320e629..e0febb5ef3 100644 --- a/tests/compiler/std/dataview.optimized.wat +++ b/tests/compiler/std/dataview.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) @@ -586,85 +586,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1584 - i32.const 0 - i32.store - i32.const 3152 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1584 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1584 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1584 - i32.const 3156 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1584 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -794,86 +715,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1296 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -977,12 +822,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -994,10 +839,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1296 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and + local.get $2 + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1014,17 +928,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1584 + i32.const 0 + i32.store + i32.const 3152 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1584 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1584 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1584 + i32.const 3156 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1584 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1096,81 +1082,6 @@ end local.get $0 ) - (func $~lib/arraybuffer/ArrayBufferView#constructor (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - local.get $0 - i32.eqz - if - i32.const 12 - i32.const 2 - call $~lib/rt/pure/__new - call $~lib/rt/pure/__retain - local.set $0 - end - local.get $0 - i32.const 0 - i32.store - local.get $0 - i32.const 0 - i32.store offset=4 - local.get $0 - i32.const 0 - i32.store offset=8 - i32.const 8 - i32.const 0 - call $~lib/rt/pure/__new - local.tee $1 - i32.const 0 - i32.store8 - local.get $1 - local.tee $2 - i32.const 4 - i32.add - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 offset=1 - local.get $2 - i32.const 0 - i32.store8 offset=2 - local.get $2 - i32.const 0 - i32.store8 offset=6 - local.get $2 - i32.const 0 - i32.store8 offset=5 - local.get $2 - i32.const 0 - i32.store8 offset=3 - local.get $2 - i32.const 0 - i32.store8 offset=4 - local.get $2 - local.get $0 - i32.load - local.tee $3 - i32.ne - if - local.get $2 - call $~lib/rt/pure/__retain - local.set $2 - local.get $3 - call $~lib/rt/pure/__release - end - local.get $0 - local.get $2 - i32.store - local.get $0 - local.get $1 - i32.store offset=4 - local.get $0 - i32.const 8 - i32.store offset=8 - local.get $0 - ) (func $~lib/typedarray/Uint8Array#__set (param $0 i32) (param $1 i32) (param $2 i32) local.get $1 local.get $0 @@ -1208,18 +1119,18 @@ local.get $4 i32.const 0 i32.store offset=8 - local.get $2 - i32.const 1073741820 - i32.gt_u - local.get $1 - local.get $2 - i32.add local.get $0 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 + local.get $1 + local.get $2 + i32.add + i32.lt_u + local.get $2 + i32.const 1073741820 i32.gt_u i32.or if @@ -1276,12 +1187,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1335,10 +1246,10 @@ i64.rotr ) (func $~lib/dataview/DataView#getFloat64 (param $0 i32) (param $1 i32) (result f64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1396,12 +1307,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 2 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1429,12 +1340,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1460,10 +1371,10 @@ ) (func $~lib/dataview/DataView#getInt64 (param $0 i32) (param $1 i32) (result i64) (local $2 i64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1518,12 +1429,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 2 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1551,12 +1462,12 @@ local.get $1 i32.const 31 i32.shr_u + local.get $0 + i32.load offset=8 local.get $1 i32.const 4 i32.add - local.get $0 - i32.load offset=8 - i32.gt_s + i32.lt_s i32.or if i32.const 1360 @@ -1582,10 +1493,10 @@ ) (func $~lib/dataview/DataView#getUint64 (param $0 i32) (param $1 i32) (result i64) (local $2 i64) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1607,10 +1518,10 @@ end ) (func $~lib/dataview/DataView#setFloat32 (param $0 i32) (param $1 f32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1635,10 +1546,10 @@ end ) (func $~lib/dataview/DataView#setFloat64 (param $0 i32) (param $1 f64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1663,10 +1574,10 @@ end ) (func $~lib/dataview/DataView#setInt16 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 2 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1687,10 +1598,10 @@ i32.store16 ) (func $~lib/dataview/DataView#setInt32 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1711,10 +1622,10 @@ i32.store ) (func $~lib/dataview/DataView#setInt64 (param $0 i32) (param $1 i64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1735,10 +1646,10 @@ i64.store ) (func $~lib/dataview/DataView#setUint16 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 2 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 2 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1759,10 +1670,10 @@ i32.store16 ) (func $~lib/dataview/DataView#setUint32 (param $0 i32) (param $1 i32) (param $2 i32) - i32.const 4 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 4 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1783,10 +1694,10 @@ i32.store ) (func $~lib/dataview/DataView#setUint64 (param $0 i32) (param $1 i64) (param $2 i32) - i32.const 8 local.get $0 i32.load offset=8 - i32.gt_s + i32.const 8 + i32.lt_s if i32.const 1360 i32.const 1488 @@ -1815,50 +1726,118 @@ i32.const 3 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - call $~lib/arraybuffer/ArrayBufferView#constructor + local.tee $0 + i32.eqz + if + i32.const 12 + i32.const 2 + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain + local.set $0 + end + local.get $0 + i32.const 0 + i32.store + local.get $0 + i32.const 0 + i32.store offset=4 + local.get $0 + i32.const 0 + i32.store offset=8 + i32.const 8 + i32.const 0 + call $~lib/rt/pure/__new + local.tee $2 + i32.const 0 + i32.store8 + local.get $2 local.tee $1 + i32.const 4 + i32.add + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 offset=1 + local.get $2 + i32.const 0 + i32.store8 offset=2 + local.get $2 + i32.const 0 + i32.store8 offset=6 + local.get $2 + i32.const 0 + i32.store8 offset=5 + local.get $2 + i32.const 0 + i32.store8 offset=3 + local.get $2 + i32.const 0 + i32.store8 offset=4 + local.get $2 + local.get $0 + i32.load + local.tee $3 + i32.ne + if + local.get $1 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__release + end + local.get $0 + local.get $1 + i32.store + local.get $0 + local.get $2 + i32.store offset=4 + local.get $0 + i32.const 8 + i32.store offset=8 + local.get $0 i32.const 0 i32.const 246 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 1 i32.const 224 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 2 i32.const 88 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 3 i32.const 159 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 4 i32.const 130 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 5 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 6 i32.const 67 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.const 7 i32.const 95 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $0 i32.load - local.get $1 + local.get $0 i32.load offset=4 - local.get $1 + local.get $0 i32.load i32.sub - local.get $1 + local.get $0 i32.load offset=8 call $~lib/dataview/DataView#constructor - local.tee $0 + local.tee $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1872,7 +1851,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1886,7 +1865,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1900,7 +1879,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1914,7 +1893,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -1928,7 +1907,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1942,7 +1921,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1956,7 +1935,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1970,7 +1949,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1984,7 +1963,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -1998,7 +1977,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const 7936550095674706383278551e126 @@ -2011,7 +1990,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const -411777475818852546741639e241 @@ -2024,7 +2003,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const -10 @@ -2037,7 +2016,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt8 i32.const -32 @@ -2050,7 +2029,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 call $~lib/dataview/DataView#getInt8 i32.const 88 @@ -2063,7 +2042,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 call $~lib/dataview/DataView#getInt8 i32.const -97 @@ -2076,7 +2055,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 call $~lib/dataview/DataView#getInt8 i32.const -126 @@ -2089,7 +2068,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 call $~lib/dataview/DataView#getInt8 i32.const 101 @@ -2102,7 +2081,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 call $~lib/dataview/DataView#getInt8 i32.const 67 @@ -2115,7 +2094,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 7 call $~lib/dataview/DataView#getInt8 i32.const 95 @@ -2128,7 +2107,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2144,7 +2123,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2160,7 +2139,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2176,7 +2155,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2192,7 +2171,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2208,7 +2187,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2224,7 +2203,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -2240,7 +2219,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2256,7 +2235,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2272,7 +2251,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2288,7 +2267,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2304,7 +2283,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2320,7 +2299,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2336,7 +2315,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -2352,7 +2331,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2366,7 +2345,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2380,7 +2359,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2394,7 +2373,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2408,7 +2387,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -2422,7 +2401,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2436,7 +2415,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2450,7 +2429,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2464,7 +2443,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2478,7 +2457,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -2492,7 +2471,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const 6864441868736323830 @@ -2505,7 +2484,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const -657428103485373601 @@ -2518,7 +2497,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 246 @@ -2531,7 +2510,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint8 i32.const 224 @@ -2544,7 +2523,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 call $~lib/dataview/DataView#getUint8 i32.const 88 @@ -2557,7 +2536,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 call $~lib/dataview/DataView#getUint8 i32.const 159 @@ -2570,7 +2549,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 call $~lib/dataview/DataView#getUint8 i32.const 130 @@ -2583,7 +2562,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 call $~lib/dataview/DataView#getUint8 i32.const 101 @@ -2596,7 +2575,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 call $~lib/dataview/DataView#getUint8 i32.const 67 @@ -2609,7 +2588,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 7 call $~lib/dataview/DataView#getUint8 i32.const 95 @@ -2622,7 +2601,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2638,7 +2617,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2654,7 +2633,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2670,7 +2649,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2686,7 +2665,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2702,7 +2681,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2718,7 +2697,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -2734,7 +2713,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2750,7 +2729,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2766,7 +2745,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2782,7 +2761,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2798,7 +2777,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2814,7 +2793,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 5 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2830,7 +2809,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 6 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -2846,7 +2825,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2860,7 +2839,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2874,7 +2853,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2888,7 +2867,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2902,7 +2881,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -2916,7 +2895,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2930,7 +2909,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2944,7 +2923,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 2 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2958,7 +2937,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 3 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2972,7 +2951,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 4 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -2986,7 +2965,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 6864441868736323830 @@ -2999,7 +2978,7 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -657428103485373601 @@ -3012,11 +2991,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f32.const 1.5976661625240943e-18 i32.const 1 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getFloat32 @@ -3030,11 +3009,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f32.const 1976281973381696323584 i32.const 0 call $~lib/dataview/DataView#setFloat32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getFloat32 @@ -3048,11 +3027,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f64.const -1094252199637739024055454e124 i32.const 1 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getFloat64 f64.const -1094252199637739024055454e124 @@ -3065,11 +3044,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 f64.const 6.022586634778589e-103 i32.const 0 call $~lib/dataview/DataView#setFloat64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getFloat64 f64.const 6.022586634778589e-103 @@ -3082,10 +3061,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.get $0 + local.get $2 i32.load offset=8 - i32.ge_u + i32.eqz if i32.const 1360 i32.const 1488 @@ -3094,11 +3072,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 i32.const 108 i32.store8 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt8 i32.const 108 @@ -3111,11 +3089,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -13360 i32.const 1 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt16 @@ -3131,11 +3109,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 14689 i32.const 0 call $~lib/dataview/DataView#setInt16 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt16 @@ -3151,11 +3129,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 1204680201 i32.const 1 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getInt32 @@ -3169,11 +3147,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 660673230 i32.const 0 call $~lib/dataview/DataView#setInt32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getInt32 @@ -3187,11 +3165,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const -3290739641816099749 i32.const 1 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getInt64 i64.const -3290739641816099749 @@ -3204,11 +3182,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 8178932412950708047 i32.const 0 call $~lib/dataview/DataView#setInt64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getInt64 i64.const 8178932412950708047 @@ -3221,10 +3199,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 - local.get $0 + local.get $2 i32.load offset=8 - i32.ge_u + i32.eqz if i32.const 1360 i32.const 1488 @@ -3233,11 +3210,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.load offset=4 i32.const 238 i32.store8 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint8 i32.const 238 @@ -3250,11 +3227,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 58856 i32.const 1 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint16 @@ -3270,11 +3247,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const 60400 i32.const 0 call $~lib/dataview/DataView#setUint16 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint16 @@ -3290,11 +3267,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -846805744 i32.const 1 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $2 i32.const 0 i32.const 1 call $~lib/dataview/DataView#getUint32 @@ -3308,11 +3285,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i32.const -1510791631 i32.const 0 call $~lib/dataview/DataView#setUint32 - local.get $0 + local.get $2 i32.const 0 i32.const 0 call $~lib/dataview/DataView#getUint32 @@ -3326,11 +3303,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const 2334704782995986958 i32.const 1 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $2 i32.const 1 call $~lib/dataview/DataView#getUint64 i64.const 2334704782995986958 @@ -3343,11 +3320,11 @@ call $~lib/builtins/abort unreachable end - local.get $0 + local.get $2 i64.const -7123186897289856329 i32.const 0 call $~lib/dataview/DataView#setUint64 - local.get $0 + local.get $2 i32.const 0 call $~lib/dataview/DataView#getUint64 i64.const -7123186897289856329 @@ -3360,23 +3337,23 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 i32.load - local.tee $3 + local.tee $1 i32.const 20 i32.sub i32.load offset=16 - local.set $2 - local.get $3 + local.set $3 + local.get $1 i32.const 0 - local.get $2 + local.get $3 call $~lib/dataview/DataView#constructor - local.set $2 - local.get $0 - call $~lib/rt/pure/__release + local.set $1 local.get $2 + call $~lib/rt/pure/__release + local.get $1 i32.load offset=4 - local.get $2 + local.get $1 i32.load i32.sub if @@ -3387,7 +3364,7 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $1 i32.load offset=8 i32.const 8 i32.ne @@ -3399,9 +3376,9 @@ call $~lib/builtins/abort unreachable end - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $2 + local.get $1 call $~lib/rt/pure/__release ) (func $~start @@ -3481,8 +3458,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/std/date.optimized.wat b/tests/compiler/std/date.optimized.wat index 5fdf447dde..7f19d178cd 100644 --- a/tests/compiler/std/date.optimized.wat +++ b/tests/compiler/std/date.optimized.wat @@ -89,7 +89,6 @@ end global.get $std/date/creationTime local.set $2 - i32.const 1116 memory.size local.tee $1 i32.const 16 @@ -99,7 +98,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1116 + i32.lt_u if local.get $1 i32.const 66651 @@ -110,9 +110,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/map.optimized.wat b/tests/compiler/std/map.optimized.wat index ae6b4f7e09..dc073f4a5e 100644 --- a/tests/compiler/std/map.optimized.wat +++ b/tests/compiler/std/map.optimized.wat @@ -588,10 +588,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -980,12 +980,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1930,6 +1930,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1938,8 +1939,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -3030,9 +3030,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -4309,9 +4309,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5288,9 +5288,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -5633,9 +5633,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5884,24 +5884,24 @@ i32.const 13 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store - local.get $3 + local.get $1 i32.const 3 i32.store offset=4 - local.get $3 + local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 - local.get $3 + local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 call $~lib/map/Map#constructor @@ -5931,13 +5931,13 @@ i32.shl i32.add i32.load16_s - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -5962,17 +5962,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -5982,7 +5982,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -6175,7 +6175,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -6522,9 +6522,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6863,9 +6863,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -7100,24 +7100,24 @@ i32.const 16 call $~lib/rt/pure/__new call $~lib/rt/pure/__retain - local.tee $3 + local.tee $1 i32.const 16 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store - local.get $3 + local.get $1 i32.const 3 i32.store offset=4 - local.get $3 + local.get $1 i32.const 32 call $~lib/arraybuffer/ArrayBuffer#constructor i32.store offset=8 - local.get $3 + local.get $1 i32.const 4 i32.store offset=12 - local.get $3 + local.get $1 i32.const 0 i32.store offset=16 - local.get $3 + local.get $1 i32.const 0 i32.store offset=20 call $~lib/map/Map#constructor @@ -7147,13 +7147,13 @@ i32.shl i32.add i32.load16_u - local.set $1 + local.set $3 local.get $6 local.get $2 call $~lib/array/Array#__get local.set $7 local.get $0 - local.get $1 + local.get $3 call $~lib/map/Map#has i32.eqz if @@ -7178,17 +7178,17 @@ call $~lib/builtins/abort unreachable end - local.get $3 - local.get $1 local.get $1 + local.get $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $5 local.get $7 i32.const 20 i32.sub - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 call $~lib/map/Map#set call $~lib/rt/pure/__release local.get $2 @@ -7198,7 +7198,7 @@ br $for-loop|4 end end - local.get $3 + local.get $1 i32.load offset=20 i32.const 100 i32.ne @@ -7383,7 +7383,7 @@ call $~lib/rt/pure/__release local.get $6 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release @@ -7453,9 +7453,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -8019,9 +8019,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -9012,9 +9012,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -9420,9 +9420,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -10030,9 +10030,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -10920,9 +10920,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -11255,9 +11255,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -12148,9 +12148,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -12519,9 +12519,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -13119,8 +13119,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/std/math.optimized.wat b/tests/compiler/std/math.optimized.wat index 2f334b9099..0cfcfc1708 100644 --- a/tests/compiler/std/math.optimized.wat +++ b/tests/compiler/std/math.optimized.wat @@ -21,10 +21,8 @@ (type $i64_=>_i64 (func (param i64) (result i64))) (type $i64_i64_=>_i64 (func (param i64 i64) (result i64))) (type $f32_i32_=>_f32 (func (param f32 i32) (result f32))) - (type $f32_f32_f32_=>_f32 (func (param f32 f32 f32) (result f32))) (type $f64_i32_=>_f64 (func (param f64 i32) (result f64))) (type $f64_f64_i32_=>_f64 (func (param f64 f64 i32) (result f64))) - (type $f64_f64_f64_=>_f64 (func (param f64 f64 f64) (result f64))) (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)) @@ -162,84 +160,8 @@ f64.reinterpret_i64 f64.mul ) - (func $std/math/ulperr (param $0 f64) (param $1 f64) (param $2 f64) (result f64) - (local $3 i32) - local.get $1 - local.get $1 - f64.ne - i32.const 0 - local.get $0 - local.get $0 - f64.ne - select - if - f64.const 0 - return - end - local.get $0 - local.get $1 - f64.eq - if - local.get $0 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - local.get $1 - i64.reinterpret_f64 - i64.const 63 - i64.shr_u - i32.wrap_i64 - i32.eq - if - local.get $2 - return - end - f64.const inf - return - end - local.get $0 - local.get $0 - f64.sub - f64.const 0 - f64.ne - if (result f64) - local.get $1 - f64.const 0.5 - f64.mul - local.set $1 - f64.const 8988465674311579538646525e283 - local.get $0 - f64.copysign - else - local.get $0 - end - local.get $1 - f64.sub - i32.const 0 - local.get $1 - i64.reinterpret_f64 - i64.const 52 - i64.shr_u - i64.const 2047 - i64.and - i32.wrap_i64 - local.tee $3 - if (result i32) - local.get $3 - else - local.get $3 - i32.const 1 - i32.add - end - i32.const -1075 - i32.add - i32.sub - call $~lib/math/NativeMath.scalbn - local.get $2 - f64.add - ) (func $std/math/check (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 i32) local.get $0 local.get $1 f64.eq @@ -256,10 +178,81 @@ f64.ne return end - local.get $0 - local.get $1 + block $__inlined_func$std/math/ulperr + local.get $1 + local.get $1 + f64.ne + i32.const 0 + local.get $0 + local.get $0 + f64.ne + select + if + f64.const 0 + local.set $2 + br $__inlined_func$std/math/ulperr + end + local.get $0 + local.get $1 + f64.eq + if + local.get $0 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + local.get $1 + i64.reinterpret_f64 + i64.const 63 + i64.shr_u + i32.wrap_i64 + i32.eq + br_if $__inlined_func$std/math/ulperr + f64.const inf + local.set $2 + br $__inlined_func$std/math/ulperr + end + local.get $0 + local.get $0 + f64.sub + f64.const 0 + f64.ne + if (result f64) + local.get $1 + f64.const 0.5 + f64.mul + local.set $1 + f64.const 8988465674311579538646525e283 + local.get $0 + f64.copysign + else + local.get $0 + end + local.get $1 + f64.sub + i32.const 1075 + local.get $1 + i64.reinterpret_f64 + i64.const 52 + i64.shr_u + i64.const 2047 + i64.and + i32.wrap_i64 + local.tee $3 + if (result i32) + local.get $3 + else + local.get $3 + i32.const 1 + i32.add + end + i32.sub + call $~lib/math/NativeMath.scalbn + local.get $2 + f64.add + local.set $2 + end local.get $2 - call $std/math/ulperr f64.abs f64.const 1.5 f64.ge @@ -345,81 +338,8 @@ f32.reinterpret_i32 f32.mul ) - (func $std/math/ulperrf (param $0 f32) (param $1 f32) (param $2 f32) (result f32) - (local $3 i32) - local.get $1 - local.get $1 - f32.ne - i32.const 0 - local.get $0 - local.get $0 - f32.ne - select - if - f32.const 0 - return - end - local.get $0 - local.get $1 - f32.eq - if - local.get $0 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - local.get $1 - i32.reinterpret_f32 - i32.const 31 - i32.shr_u - i32.eq - if - local.get $2 - return - end - f32.const inf - return - end - local.get $0 - local.get $0 - f32.sub - f32.const 0 - f32.ne - if (result f32) - local.get $1 - f32.const 0.5 - f32.mul - local.set $1 - f32.const 1701411834604692317316873e14 - local.get $0 - f32.copysign - else - local.get $0 - end - local.get $1 - f32.sub - i32.const 0 - local.get $1 - i32.reinterpret_f32 - i32.const 23 - i32.shr_u - i32.const 255 - i32.and - local.tee $3 - if (result i32) - local.get $3 - else - local.get $3 - i32.const 1 - i32.add - end - i32.const -150 - i32.add - i32.sub - call $~lib/math/NativeMathf.scalbn - local.get $2 - f32.add - ) (func $std/math/check (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) local.get $0 local.get $1 f32.eq @@ -436,10 +356,78 @@ f32.ne return end - local.get $0 - local.get $1 + block $__inlined_func$std/math/ulperrf + local.get $1 + local.get $1 + f32.ne + i32.const 0 + local.get $0 + local.get $0 + f32.ne + select + if + f32.const 0 + local.set $2 + br $__inlined_func$std/math/ulperrf + end + local.get $0 + local.get $1 + f32.eq + if + local.get $0 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + local.get $1 + i32.reinterpret_f32 + i32.const 31 + i32.shr_u + i32.eq + br_if $__inlined_func$std/math/ulperrf + f32.const inf + local.set $2 + br $__inlined_func$std/math/ulperrf + end + local.get $0 + local.get $0 + f32.sub + f32.const 0 + f32.ne + if (result f32) + local.get $1 + f32.const 0.5 + f32.mul + local.set $1 + f32.const 1701411834604692317316873e14 + local.get $0 + f32.copysign + else + local.get $0 + end + local.get $1 + f32.sub + i32.const 150 + local.get $1 + i32.reinterpret_f32 + i32.const 23 + i32.shr_u + i32.const 255 + i32.and + local.tee $3 + if (result i32) + local.get $3 + else + local.get $3 + i32.const 1 + i32.add + end + i32.sub + call $~lib/math/NativeMathf.scalbn + local.get $2 + f32.add + local.set $2 + end local.get $2 - call $std/math/ulperrf f32.abs f32.const 1.5 f32.ge @@ -1731,86 +1719,93 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.asin (param $0 f32) (result f32) - (local $1 i32) - (local $2 f64) - (local $3 f32) - local.get $0 - i32.reinterpret_f32 - i32.const 2147483647 - i32.and - local.tee $1 - i32.const 1065353216 - i32.ge_u - if - local.get $1 + (func $std/math/test_asinf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 i32) + (local $4 f64) + (local $5 f32) + block $__inlined_func$~lib/math/NativeMathf.asin + local.get $0 + i32.reinterpret_f32 + i32.const 2147483647 + i32.and + local.tee $3 i32.const 1065353216 - i32.eq + i32.ge_u if + local.get $3 + i32.const 1065353216 + i32.eq + if + local.get $0 + f32.const 1.5707963705062866 + f32.mul + f32.const 7.52316384526264e-37 + f32.add + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin + end + f32.const 0 local.get $0 - f32.const 1.5707963705062866 - f32.mul - f32.const 7.52316384526264e-37 - f32.add - return + local.get $0 + f32.sub + f32.div + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin end - f32.const 0 - local.get $0 - local.get $0 - f32.sub - f32.div - return - end - local.get $1 - i32.const 1056964608 - i32.lt_u - if - local.get $1 - i32.const 8388608 - i32.ge_u - i32.const 0 - local.get $1 - i32.const 964689920 + local.get $3 + i32.const 1056964608 i32.lt_u - select if + local.get $3 + i32.const 8388608 + i32.ge_u + i32.const 0 + local.get $3 + i32.const 964689920 + i32.lt_u + select + br_if $__inlined_func$~lib/math/NativeMathf.asin local.get $0 - return + local.get $0 + local.get $0 + local.get $0 + f32.mul + call $~lib/math/Rf + f32.mul + f32.add + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.asin end + f64.const 1.5707963705062866 + f32.const 0.5 local.get $0 - local.get $0 - local.get $0 - local.get $0 + f32.abs + f32.const 0.5 f32.mul + f32.sub + local.tee $5 + f64.promote_f32 + f64.sqrt + local.tee $4 + local.get $4 + local.get $5 call $~lib/math/Rf - f32.mul - f32.add - return + f64.promote_f32 + f64.mul + f64.add + local.tee $4 + local.get $4 + f64.add + f64.sub + f32.demote_f64 + local.get $0 + f32.copysign + local.set $0 end - f64.const 1.5707963705062866 - f32.const 0.5 local.get $0 - f32.abs - f32.const 0.5 - f32.mul - f32.sub - local.tee $3 - f64.promote_f32 - f64.sqrt - local.tee $2 - local.get $2 - local.get $3 - call $~lib/math/Rf - f64.promote_f32 - f64.mul - f64.add - local.tee $2 + local.get $1 local.get $2 - f64.add - f64.sub - f32.demote_f64 - local.get $0 - f32.copysign + call $std/math/check ) (func $std/math/test_asinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) (local $3 f64) @@ -2648,18 +2643,18 @@ local.get $4 i32.const 2146435072 i32.eq + local.get $4 local.get $5 i32.const 67108864 i32.add - local.get $4 - i32.lt_u + i32.gt_u select br_if $folding-inner0 + local.get $5 local.get $4 i32.const 67108864 i32.add - local.get $5 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 2 @@ -2865,18 +2860,18 @@ local.get $3 i32.const 2139095040 i32.eq + local.get $3 local.get $4 i32.const 218103808 i32.add - local.get $3 - i32.lt_u + i32.gt_u select br_if $folding-inner0 + local.get $4 local.get $3 i32.const 218103808 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 2 @@ -3206,7 +3201,7 @@ i64.shr_u i64.const 1045 i64.sub - local.tee $2 + local.tee $4 i64.const 6 i64.shr_s i32.wrap_i64 @@ -3219,42 +3214,42 @@ local.set $6 local.get $7 i64.load offset=8 - local.set $4 + local.set $3 local.get $7 i64.load offset=16 local.set $1 - local.get $2 + local.get $4 i64.const 63 i64.and - local.tee $2 + local.tee $4 i64.const 0 i64.ne if local.get $6 - local.get $2 - i64.shl local.get $4 + i64.shl + local.get $3 i64.const 64 - local.get $2 + local.get $4 i64.sub - local.tee $3 + local.tee $2 i64.shr_u i64.or local.set $6 + local.get $3 local.get $4 - local.get $2 i64.shl local.get $1 - local.get $3 + local.get $2 i64.shr_u i64.or - local.set $4 + local.set $3 local.get $1 - local.get $2 + local.get $4 i64.shl local.get $7 i64.load offset=24 - local.get $3 + local.get $2 i64.shr_u i64.or local.set $1 @@ -3264,121 +3259,122 @@ i64.and i64.const 4503599627370496 i64.or - local.tee $2 + local.tee $4 i64.const 4294967295 i64.and - local.tee $3 - local.get $4 + local.tee $2 + local.get $3 i64.const 32 i64.shr_u local.tee $8 i64.mul - local.get $4 + local.get $3 i64.const 4294967295 i64.and local.tee $5 - local.get $3 + local.get $2 i64.mul local.tee $9 i64.const 32 i64.shr_u i64.add - local.set $4 + local.set $3 local.get $5 - local.get $2 + local.get $4 i64.const 32 i64.shr_u local.tee $5 i64.mul - local.get $4 + local.get $3 i64.const 4294967295 i64.and i64.add - local.set $3 + local.set $2 local.get $5 local.get $8 i64.mul - local.get $4 + local.get $3 i64.const 32 i64.shr_u i64.add - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add global.set $~lib/math/res128_hi - global.get $~lib/math/res128_hi - local.get $2 - local.get $6 - i64.mul - i64.add - local.get $2 + local.get $4 i64.const 32 i64.shr_s local.get $1 i64.const 32 i64.shr_u i64.mul - local.tee $4 + local.tee $3 local.get $9 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i64.const 32 i64.shl i64.add i64.add - local.tee $2 - local.get $4 + local.set $1 + local.get $1 + local.get $3 i64.lt_u i64.extend_i32_u + global.get $~lib/math/res128_hi + local.get $4 + local.get $6 + i64.mul + i64.add i64.add local.tee $8 i64.const 2 i64.shl - local.get $2 + local.get $1 i64.const 62 i64.shr_u i64.or local.tee $6 i64.const 63 i64.shr_s - local.tee $1 + local.tee $4 i64.const 1 i64.shr_s local.get $6 i64.xor - local.tee $3 + local.tee $2 i64.clz - local.set $4 + local.set $3 + local.get $2 local.get $3 - local.get $4 i64.shl + local.get $4 local.get $1 - local.get $2 i64.const 2 i64.shl i64.xor local.tee $5 i64.const 64 - local.get $4 + local.get $3 i64.sub i64.shr_u i64.or - local.tee $2 + local.tee $1 i64.const 4294967295 i64.and - local.set $3 - local.get $2 + local.set $2 + local.get $1 i64.const 32 i64.shr_u local.tee $9 i64.const 560513588 i64.mul - local.get $3 + local.get $2 i64.const 3373259426 i64.mul - local.get $3 + local.get $2 i64.const 560513588 i64.mul local.tee $10 @@ -3389,7 +3385,7 @@ i64.const 4294967295 i64.and i64.add - local.set $3 + local.set $2 local.get $9 i64.const 3373259426 i64.mul @@ -3397,7 +3393,7 @@ i64.const 32 i64.shr_u i64.add - local.get $3 + local.get $2 i64.const 32 i64.shr_u i64.add @@ -3405,24 +3401,24 @@ local.get $10 i64.const 4294967295 i64.and - local.get $3 + local.get $2 i64.const 32 i64.shl i64.add - local.tee $3 - local.get $2 + local.tee $2 + local.get $1 f64.convert_i64_u f64.const 3.753184150245214e-04 f64.mul local.get $5 - local.get $4 + local.get $3 i64.shl f64.convert_i64_u f64.const 3.834951969714103e-04 f64.mul f64.add i64.trunc_f64_u - local.tee $2 + local.tee $1 i64.lt_u i64.extend_i32_u global.get $~lib/math/res128_hi @@ -3432,11 +3428,11 @@ i64.add f64.convert_i64_u global.set $~lib/math/rempio2_y0 - local.get $2 + local.get $1 local.get $5 i64.const 53 i64.shl - local.get $3 + local.get $2 i64.const 11 i64.shr_u i64.or @@ -3447,7 +3443,7 @@ global.set $~lib/math/rempio2_y1 global.get $~lib/math/rempio2_y0 i64.const 4372995238176751616 - local.get $4 + local.get $3 i64.const 52 i64.shl i64.sub @@ -3468,7 +3464,7 @@ local.get $8 i64.const 62 i64.shr_s - local.get $1 + local.get $4 i64.sub i32.wrap_i64 ) @@ -5403,17 +5399,17 @@ (local $9 f64) (local $10 f64) (local $11 f64) - local.get $0 + local.get $1 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 - local.get $1 + local.tee $2 + local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $2 - i64.lt_u + local.tee $3 + i64.gt_u if local.get $3 local.get $2 @@ -5567,17 +5563,17 @@ (local $3 i32) (local $4 i32) (local $5 f32) - local.get $0 + local.get $1 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 - local.get $1 + local.tee $2 + local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $2 - i32.lt_u + local.tee $3 + i32.gt_u if local.get $3 local.get $2 @@ -6531,12 +6527,12 @@ f64.div return end + local.get $6 local.get $2 i64.const 1 i64.shl local.tee $8 - local.get $6 - i64.le_u + i64.ge_u if local.get $0 local.get $6 @@ -6754,12 +6750,12 @@ f32.div return end + local.get $6 local.get $2 i32.const 1 i32.shl local.tee $8 - local.get $6 - i32.le_u + i32.ge_u if local.get $0 local.get $6 @@ -8501,9 +8497,9 @@ local.tee $8 f64.eq select - local.get $8 local.get $1 - f64.gt + local.get $8 + f64.lt select i32.const 0 local.get $5 @@ -8738,9 +8734,9 @@ local.tee $8 f32.eq select - local.get $8 local.get $1 - f32.gt + local.get $8 + f32.lt select i32.const 0 local.get $5 @@ -9360,86 +9356,88 @@ i32.and select ) - (func $~lib/math/NativeMath.sinh (param $0 f64) (result f64) - (local $1 f64) - (local $2 f64) - (local $3 i32) - (local $4 i64) + (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 i64) + local.get $0 + local.set $3 local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $4 + local.tee $7 f64.reinterpret_i64 - local.set $1 + local.set $4 f64.const 0.5 local.get $0 f64.copysign - local.set $2 - local.get $4 - i64.const 32 - i64.shr_u - i32.wrap_i64 - local.tee $3 - i32.const 1082535490 - i32.lt_u - if - local.get $1 - call $~lib/math/NativeMath.expm1 - local.set $1 - local.get $3 - i32.const 1072693248 + local.set $5 + block $__inlined_func$~lib/math/NativeMath.sinh + local.get $7 + i64.const 32 + i64.shr_u + i32.wrap_i64 + local.tee $6 + i32.const 1082535490 i32.lt_u if - local.get $3 - i32.const 1045430272 + local.get $4 + call $~lib/math/NativeMath.expm1 + local.set $4 + local.get $6 + i32.const 1072693248 i32.lt_u if - local.get $0 - return + local.get $6 + i32.const 1045430272 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMath.sinh + local.get $5 + local.get $4 + local.get $4 + f64.add + local.get $4 + local.get $4 + f64.mul + local.get $4 + f64.const 1 + f64.add + f64.div + f64.sub + f64.mul + local.set $3 + br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $2 - local.get $1 - local.get $1 - f64.add - local.get $1 - local.get $1 - f64.mul - local.get $1 + local.get $5 + local.get $4 + local.get $4 + local.get $4 f64.const 1 f64.add f64.div - f64.sub + f64.add f64.mul - return + local.set $3 + br $__inlined_func$~lib/math/NativeMath.sinh end - local.get $2 - local.get $1 - local.get $1 - local.get $1 - f64.const 1 - f64.add - f64.div + local.get $4 + f64.const 1416.0996898839683 + f64.sub + call $~lib/math/NativeMath.exp + local.get $5 + local.get $5 f64.add + f64.const 2247116418577894884661631e283 f64.mul - return + f64.mul + f64.const 2247116418577894884661631e283 + f64.mul + local.set $3 end - local.get $1 - f64.const 1416.0996898839683 - f64.sub - call $~lib/math/NativeMath.exp - local.get $2 - local.get $2 - f64.add - f64.const 2247116418577894884661631e283 - f64.mul - f64.mul - f64.const 2247116418577894884661631e283 - f64.mul - ) - (func $std/math/test_sinh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.sinh + local.get $3 local.get $1 local.get $2 call $std/math/check @@ -9453,77 +9451,83 @@ i32.const 0 end ) - (func $~lib/math/NativeMathf.sinh (param $0 f32) (result f32) - (local $1 f32) - (local $2 f32) - (local $3 i32) + (func $std/math/test_sinhf (param $0 f32) (param $1 f32) (param $2 f32) (result i32) + (local $3 f32) + (local $4 f32) + (local $5 i32) local.get $0 i32.reinterpret_f32 i32.const 2147483647 i32.and - local.tee $3 + local.tee $5 f32.reinterpret_i32 - local.set $1 + local.set $3 f32.const 0.5 local.get $0 f32.copysign - local.set $2 - local.get $3 - i32.const 1118925335 - i32.lt_u - if - local.get $1 - call $~lib/math/NativeMathf.expm1 - local.set $1 - local.get $3 - i32.const 1065353216 + local.set $4 + block $__inlined_func$~lib/math/NativeMathf.sinh + local.get $5 + i32.const 1118925335 i32.lt_u if local.get $3 - i32.const 964689920 + call $~lib/math/NativeMathf.expm1 + local.set $3 + local.get $5 + i32.const 1065353216 i32.lt_u if - local.get $0 - return + local.get $5 + i32.const 964689920 + i32.lt_u + br_if $__inlined_func$~lib/math/NativeMathf.sinh + local.get $4 + local.get $3 + local.get $3 + f32.add + local.get $3 + local.get $3 + f32.mul + local.get $3 + f32.const 1 + f32.add + f32.div + f32.sub + f32.mul + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sinh end - local.get $2 - local.get $1 - local.get $1 - f32.add - local.get $1 - local.get $1 - f32.mul - local.get $1 + local.get $4 + local.get $3 + local.get $3 + local.get $3 f32.const 1 f32.add f32.div - f32.sub + f32.add f32.mul - return + local.set $0 + br $__inlined_func$~lib/math/NativeMathf.sinh end - local.get $2 - local.get $1 - local.get $1 - local.get $1 - f32.const 1 - f32.add - f32.div + local.get $3 + f32.const 162.88958740234375 + f32.sub + call $~lib/math/NativeMathf.exp + local.get $4 + local.get $4 f32.add + f32.const 1661534994731144841129758e11 f32.mul - return + f32.mul + f32.const 1661534994731144841129758e11 + f32.mul + local.set $0 end + local.get $0 local.get $1 - f32.const 162.88958740234375 - f32.sub - call $~lib/math/NativeMathf.exp local.get $2 - local.get $2 - f32.add - f32.const 1661534994731144841129758e11 - f32.mul - f32.mul - f32.const 1661534994731144841129758e11 - f32.mul + call $std/math/check ) (func $std/math/test_sqrt (param $0 f64) (param $1 f64) (param $2 f64) (result i32) local.get $0 @@ -10169,39 +10173,39 @@ select f32.demote_f64 ) - (func $~lib/math/NativeMath.tanh (param $0 f64) (result f64) - (local $1 f64) - (local $2 i32) - (local $3 i64) + (func $std/math/test_tanh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) + (local $3 f64) + (local $4 i32) + (local $5 i64) local.get $0 i64.reinterpret_f64 i64.const 9223372036854775807 i64.and - local.tee $3 + local.tee $5 f64.reinterpret_i64 - local.set $1 - local.get $3 + local.set $3 + local.get $5 i64.const 32 i64.shr_u i32.wrap_i64 - local.tee $2 + local.tee $4 i32.const 1071748074 i32.gt_u if (result f64) - local.get $2 + local.get $4 i32.const 1077149696 i32.gt_u if (result f64) f64.const 1 f64.const 0 - local.get $1 + local.get $3 f64.div f64.sub else f64.const 1 f64.const 2 - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.add call $~lib/math/NativeMath.expm1 f64.const 2 @@ -10210,45 +10214,41 @@ f64.sub end else - local.get $2 + local.get $4 i32.const 1070618798 i32.gt_u if (result f64) - local.get $1 - local.get $1 + local.get $3 + local.get $3 f64.add call $~lib/math/NativeMath.expm1 - local.tee $1 - local.get $1 + local.tee $3 + local.get $3 f64.const 2 f64.add f64.div else - local.get $2 + local.get $4 i32.const 1048576 i32.ge_u if (result f64) - local.get $1 + local.get $3 f64.const -2 f64.mul call $~lib/math/NativeMath.expm1 - local.tee $1 + local.tee $3 f64.neg - local.get $1 + local.get $3 f64.const 2 f64.add f64.div else - local.get $1 + local.get $3 end end end local.get $0 f64.copysign - ) - (func $std/math/test_tanh (param $0 f64) (param $1 f64) (param $2 f64) (result i32) - local.get $0 - call $~lib/math/NativeMath.tanh local.get $1 local.get $2 call $std/math/check @@ -13667,10 +13667,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13681,10 +13680,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13695,10 +13693,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13709,10 +13706,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13723,10 +13719,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13737,10 +13732,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.asin f32.const 0.7234652042388916 f32.const -0.1307632476091385 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13751,10 +13745,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.asin f32.const -0.41873374581336975 f32.const 0.3161141574382782 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13765,10 +13758,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.asin f32.const 0.5965113639831543 f32.const -0.4510819613933563 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13779,10 +13771,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.asin f32.const 0.8853747844696045 f32.const 0.02493886835873127 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13793,10 +13784,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.asin f32.const -0.7460777759552002 f32.const 0.2515012323856354 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13807,10 +13797,9 @@ unreachable end f32.const 1 - call $~lib/math/NativeMathf.asin f32.const 1.5707963705062866 f32.const 0.3666777014732361 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13821,10 +13810,9 @@ unreachable end f32.const -1 - call $~lib/math/NativeMathf.asin f32.const -1.5707963705062866 f32.const -0.3666777014732361 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13835,10 +13823,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.asin f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13849,10 +13836,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.asin f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13863,10 +13849,9 @@ unreachable end f32.const 1.0000001192092896 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13877,10 +13862,9 @@ unreachable end f32.const -1.0000001192092896 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13891,10 +13875,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13905,10 +13888,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13919,10 +13901,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.asin f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -13933,10 +13914,9 @@ unreachable end f32.const 0.5004770159721375 - call $~lib/math/NativeMathf.asin f32.const 0.5241496562957764 f32.const -0.29427099227905273 - call $std/math/check + call $std/math/test_asinf i32.eqz if i32.const 0 @@ -44303,10 +44283,9 @@ unreachable end f32.const -8.066848754882812 - call $~lib/math/NativeMathf.sinh f32.const -1593.521240234375 f32.const 0.1671663224697113 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44317,10 +44296,9 @@ unreachable end f32.const 4.345239639282227 - call $~lib/math/NativeMathf.sinh f32.const 38.548770904541016 f32.const -0.49340328574180603 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44331,10 +44309,9 @@ unreachable end f32.const -8.381433486938477 - call $~lib/math/NativeMathf.sinh f32.const -2182.630859375 f32.const 0.0849970355629921 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44345,10 +44322,9 @@ unreachable end f32.const -6.531673431396484 - call $~lib/math/NativeMathf.sinh f32.const -343.2723388671875 f32.const 0.0704190656542778 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44359,10 +44335,9 @@ unreachable end f32.const 9.267057418823242 - call $~lib/math/NativeMathf.sinh f32.const 5291.78125 f32.const -0.44362515211105347 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44373,10 +44348,9 @@ unreachable end f32.const 0.6619858741760254 - call $~lib/math/NativeMathf.sinh f32.const 0.7114062309265137 f32.const 0.058103885501623154 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44387,10 +44361,9 @@ unreachable end f32.const -0.40660393238067627 - call $~lib/math/NativeMathf.sinh f32.const -0.4179006516933441 f32.const 0.39349499344825745 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44401,10 +44374,9 @@ unreachable end f32.const 0.5617597699165344 - call $~lib/math/NativeMathf.sinh f32.const 0.5917755961418152 f32.const -0.4183797240257263 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44415,10 +44387,9 @@ unreachable end f32.const 0.7741522789001465 - call $~lib/math/NativeMathf.sinh f32.const 0.8538292050361633 f32.const 0.45992106199264526 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44429,10 +44400,9 @@ unreachable end f32.const -0.6787636876106262 - call $~lib/math/NativeMathf.sinh f32.const -0.7320976257324219 f32.const -0.48159059882164 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44443,10 +44413,9 @@ unreachable end f32.const 0 - call $~lib/math/NativeMathf.sinh f32.const 0 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44457,10 +44426,9 @@ unreachable end f32.const -0 - call $~lib/math/NativeMathf.sinh f32.const -0 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44471,10 +44439,9 @@ unreachable end f32.const inf - call $~lib/math/NativeMathf.sinh f32.const inf f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44485,10 +44452,9 @@ unreachable end f32.const -inf - call $~lib/math/NativeMathf.sinh f32.const -inf f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 @@ -44499,10 +44465,9 @@ unreachable end f32.const nan:0x400000 - call $~lib/math/NativeMathf.sinh f32.const nan:0x400000 f32.const 0 - call $std/math/check + call $std/math/test_sinhf i32.eqz if i32.const 0 diff --git a/tests/compiler/std/mod.optimized.wat b/tests/compiler/std/mod.optimized.wat index 5adbf0b09a..c6a3c675c3 100644 --- a/tests/compiler/std/mod.optimized.wat +++ b/tests/compiler/std/mod.optimized.wat @@ -77,12 +77,12 @@ f64.div return end + local.get $6 local.get $2 i64.const 1 i64.shl local.tee $8 - local.get $6 - i64.le_u + i64.ge_u if local.get $0 local.get $6 @@ -325,12 +325,12 @@ f32.div return end + local.get $6 local.get $2 i32.const 1 i32.shl local.tee $8 - local.get $6 - i32.le_u + i32.ge_u if local.get $0 local.get $6 diff --git a/tests/compiler/std/new.optimized.wat b/tests/compiler/std/new.optimized.wat index 2f3f991f33..46c1a33ae8 100644 --- a/tests/compiler/std/new.optimized.wat +++ b/tests/compiler/std/new.optimized.wat @@ -6,7 +6,6 @@ (func $~start (local $0 i32) (local $1 i32) - i32.const 1068 memory.size local.tee $1 i32.const 16 @@ -16,7 +15,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1068 + i32.lt_u if local.get $1 i32.const 66603 @@ -27,9 +27,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/object.optimized.wat b/tests/compiler/std/object.optimized.wat index 2ae13966cf..50a2f1940a 100644 --- a/tests/compiler/std/object.optimized.wat +++ b/tests/compiler/std/object.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $f32_f32_=>_i32 (func (param f32 f32) (result i32))) (type $f64_f64_=>_i32 (func (param f64 f64) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) @@ -63,84 +62,10 @@ i32.ne i32.eq ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -170,10 +95,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end diff --git a/tests/compiler/std/operator-overloading.optimized.wat b/tests/compiler/std/operator-overloading.optimized.wat index 8517eb637a..80fe6fe3f1 100644 --- a/tests/compiler/std/operator-overloading.optimized.wat +++ b/tests/compiler/std/operator-overloading.optimized.wat @@ -111,9 +111,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/std/set.optimized.wat b/tests/compiler/std/set.optimized.wat index 0867c00c16..91d38c8944 100644 --- a/tests/compiler/std/set.optimized.wat +++ b/tests/compiler/std/set.optimized.wat @@ -585,10 +585,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -977,12 +977,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1184 @@ -1913,6 +1913,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1921,8 +1922,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2239,9 +2239,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -3047,9 +3047,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -3823,9 +3823,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -3920,9 +3920,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -4592,9 +4592,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -4687,9 +4687,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5469,9 +5469,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -5562,9 +5562,9 @@ local.get $0 i32.load offset=20 local.tee $1 - i32.const 4 local.get $1 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -5995,9 +5995,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6817,9 +6817,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -6911,9 +6911,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -7378,9 +7378,9 @@ local.get $7 i32.store offset=12 loop $for-loop|0 - local.get $9 local.get $8 - i32.lt_s + local.get $9 + i32.gt_s if local.get $5 local.get $9 @@ -8089,9 +8089,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -8217,9 +8217,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -8915,9 +8915,9 @@ local.get $8 i32.store offset=12 loop $for-loop|0 - local.get $10 local.get $9 - i32.lt_s + local.get $10 + i32.gt_s if local.get $6 local.get $10 @@ -9043,9 +9043,9 @@ local.get $0 i32.load offset=20 local.tee $2 - i32.const 4 local.get $2 - i32.gt_u + i32.const 4 + i32.lt_u select i32.ge_u if (result i32) @@ -9456,8 +9456,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1120 diff --git a/tests/compiler/std/static-array.optimized.wat b/tests/compiler/std/static-array.optimized.wat index 5070f3571e..2d2ec3bf4d 100644 --- a/tests/compiler/std/static-array.optimized.wat +++ b/tests/compiler/std/static-array.optimized.wat @@ -88,9 +88,9 @@ i32.const 16 i32.shr_u local.tee $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -341,9 +341,9 @@ i32.const 1 i32.shl local.tee $1 - local.get $2 local.get $1 - i32.gt_u + local.get $2 + i32.lt_u select local.tee $2 i32.const 1073741820 @@ -547,19 +547,19 @@ (local $3 i32) (local $4 i32) (local $5 i32) - i32.const 1 local.get $0 i32.load offset=8 local.tee $4 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if - i32.const 1 i32.const 1073741820 local.get $1 i32.shr_u - i32.gt_u + i32.const 1 + i32.lt_u if i32.const 1584 i32.const 1536 @@ -721,10 +721,9 @@ end i32.const 1676 global.set $~lib/rt/stub/offset - i32.const 0 i32.const 1100 i32.load - i32.ge_u + i32.eqz if i32.const 1088 i32.const 2 @@ -785,10 +784,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1196 i32.load - i32.ge_u + i32.eqz if i32.const 1184 i32.const 3 @@ -849,10 +847,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1276 i32.load - i32.ge_u + i32.eqz if i32.const 1264 i32.const 2 @@ -913,10 +910,9 @@ call $~lib/builtins/abort unreachable end - i32.const 0 i32.const 1372 i32.load - i32.ge_u + i32.eqz if i32.const 1360 i32.const 3 diff --git a/tests/compiler/std/staticarray.optimized.wat b/tests/compiler/std/staticarray.optimized.wat index f91ef3bed0..32fa08e058 100644 --- a/tests/compiler/std/staticarray.optimized.wat +++ b/tests/compiler/std/staticarray.optimized.wat @@ -1,8 +1,8 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $none_=>_none (func)) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) + (type $none_=>_none (func)) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) @@ -48,14 +48,14 @@ i32.load ) (func $~lib/staticarray/StaticArray#__set (param $0 i32) (param $1 i32) - i32.const 1 local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 2 i32.shr_u - i32.ge_u + i32.const 1 + i32.le_u if i32.const 1088 i32.const 1152 @@ -615,85 +615,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1504 - i32.const 0 - i32.store - i32.const 3072 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1504 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1504 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1504 - i32.const 3076 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1504 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) local.get $1 @@ -823,86 +744,10 @@ end end ) - (func $~lib/rt/tlsf/prepareBlock (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - local.get $1 - i32.load - local.set $3 - local.get $2 - i32.const 4 - i32.add - i32.const 15 - i32.and - if - i32.const 0 - i32.const 1472 - i32.const 360 - i32.const 14 - call $~lib/builtins/abort - unreachable - end - local.get $3 - i32.const -4 - i32.and - local.get $2 - i32.sub - local.tee $4 - i32.const 16 - i32.ge_u - if - local.get $1 - local.get $2 - local.get $3 - i32.const 2 - i32.and - i32.or - i32.store - local.get $2 - local.get $1 - i32.const 4 - i32.add - i32.add - local.tee $1 - local.get $4 - i32.const 4 - i32.sub - i32.const 1 - i32.or - i32.store - local.get $0 - local.get $1 - call $~lib/rt/tlsf/insertBlock - else - local.get $1 - local.get $3 - i32.const -2 - i32.and - i32.store - local.get $1 - i32.const 4 - i32.add - local.tee $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - local.get $0 - local.get $1 - i32.load - i32.const -4 - i32.and - i32.add - i32.load - i32.const -3 - i32.and - i32.store - end - ) (func $~lib/rt/tlsf/allocateBlock (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) + (local $4 i32) local.get $1 i32.const 1073741820 i32.ge_u @@ -1006,12 +851,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1472 @@ -1023,10 +868,79 @@ local.get $0 local.get $1 call $~lib/rt/tlsf/removeBlock - local.get $0 local.get $1 + i32.load + local.set $3 + local.get $2 + i32.const 4 + i32.add + i32.const 15 + i32.and + if + i32.const 0 + i32.const 1472 + i32.const 360 + i32.const 14 + call $~lib/builtins/abort + unreachable + end + local.get $3 + i32.const -4 + i32.and local.get $2 - call $~lib/rt/tlsf/prepareBlock + i32.sub + local.tee $4 + i32.const 16 + i32.ge_u + if + local.get $1 + local.get $2 + local.get $3 + i32.const 2 + i32.and + i32.or + i32.store + local.get $2 + local.get $1 + i32.const 4 + i32.add + i32.add + local.tee $2 + local.get $4 + i32.const 4 + i32.sub + i32.const 1 + i32.or + i32.store + local.get $0 + local.get $2 + call $~lib/rt/tlsf/insertBlock + else + local.get $1 + local.get $3 + i32.const -2 + i32.and + i32.store + local.get $1 + i32.const 4 + i32.add + local.tee $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + local.get $0 + local.get $1 + i32.load + i32.const -4 + i32.and + i32.add + i32.load + i32.const -3 + i32.and + i32.store + end local.get $1 ) (func $~lib/rt/pure/__new (param $0 i32) (param $1 i32) (result i32) @@ -1043,17 +957,89 @@ call $~lib/builtins/abort unreachable end - local.get $0 - i32.const 16 - i32.add - local.set $2 global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $3 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $3 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1504 + i32.const 0 + i32.store + i32.const 3072 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $2 + i32.const 23 + i32.lt_u + if + local.get $2 + i32.const 2 + i32.shl + i32.const 1504 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $3 + loop $for-loop|1 + local.get $3 + i32.const 16 + i32.lt_u + if + local.get $3 + local.get $2 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1504 + i32.add + i32.const 0 + i32.store offset=96 + local.get $3 + i32.const 1 + i32.add + local.set $3 + br $for-loop|1 + end + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + i32.const 1504 + i32.const 3076 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1504 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT - local.get $2 + local.get $0 + i32.const 16 + i32.add call $~lib/rt/tlsf/allocateBlock i32.const 4 i32.add @@ -1662,8 +1648,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1408 diff --git a/tests/compiler/std/string-casemapping.optimized.wat b/tests/compiler/std/string-casemapping.optimized.wat index e40d126df2..b596a29284 100644 --- a/tests/compiler/std/string-casemapping.optimized.wat +++ b/tests/compiler/std/string-casemapping.optimized.wat @@ -899,10 +899,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1291,12 +1291,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1216 @@ -1480,9 +1480,9 @@ i32.sub return else - local.get $6 local.get $5 - i32.gt_u + local.get $6 + i32.lt_u if (result i32) local.get $3 else @@ -1829,6 +1829,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -1837,8 +1838,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -2020,9 +2020,9 @@ local.set $9 block $~lib/util/casemap/bsearch|inlined.0 loop $while-continue|1 - local.get $9 local.get $1 - i32.le_s + local.get $9 + i32.ge_s if local.get $1 local.get $9 @@ -2501,6 +2501,8 @@ i32.const 1 i32.shl i32.add + i32.const 962 + i32.const 963 local.get $8 i32.const 1 i32.gt_u @@ -2514,9 +2516,9 @@ i32.const 30 i32.sub local.tee $1 - i32.const 0 local.get $1 - i32.gt_s + i32.const 0 + i32.lt_s select local.set $9 loop $while-continue|1 @@ -2645,9 +2647,9 @@ select local.set $2 loop $while-continue|2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s if local.get $0 local.get $3 @@ -2730,11 +2732,7 @@ else i32.const 0 end - if (result i32) - i32.const 962 - else - i32.const 963 - end + select i32.store16 else local.get $1 @@ -2955,25 +2953,23 @@ (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) local.get $0 i64.eqz if i32.const 18720 return end + i64.const 0 + local.get $0 + i64.sub + local.get $0 local.get $0 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $3 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end - local.get $0 + select + local.tee $0 i64.const 4294967295 i64.le_u if @@ -3028,14 +3024,6 @@ local.tee $4 local.set $5 loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $6 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $5 local.get $2 i32.const 1 @@ -3044,11 +3032,16 @@ i32.const 1 i32.shl i32.add - local.get $6 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end else @@ -3105,15 +3098,6 @@ local.tee $4 local.set $2 loop $do-continue|00 - local.get $0 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $5 - local.get $0 - i64.const 10 - i64.div_u - local.set $0 local.get $2 local.get $1 i32.const 1 @@ -3122,11 +3106,17 @@ i32.const 1 i32.shl i32.add - local.get $5 + local.get $0 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $0 + i64.const 10 + i64.div_u + local.tee $0 i64.const 0 i64.ne br_if $do-continue|00 @@ -3194,8 +3184,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1056 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -3213,9 +3201,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -4972,8 +4960,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1088 diff --git a/tests/compiler/std/string-encoding.optimized.wat b/tests/compiler/std/string-encoding.optimized.wat index c19a4c1a08..a317f3e795 100644 --- a/tests/compiler/std/string-encoding.optimized.wat +++ b/tests/compiler/std/string-encoding.optimized.wat @@ -649,10 +649,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1041,12 +1041,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1280 @@ -1841,11 +1841,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -1942,11 +1942,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $2 i32.const 64512 @@ -2527,6 +2527,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -2535,8 +2536,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -3310,8 +3310,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1088 diff --git a/tests/compiler/std/string.optimized.wat b/tests/compiler/std/string.optimized.wat index fa247f52d8..ec1418b24c 100644 --- a/tests/compiler/std/string.optimized.wat +++ b/tests/compiler/std/string.optimized.wat @@ -1239,10 +1239,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1631,12 +1631,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1488 @@ -2052,9 +2052,9 @@ i32.mul local.set $3 loop $while-continue|0 - local.get $4 local.get $3 - i32.lt_u + local.get $4 + i32.gt_u if local.get $0 local.get $4 @@ -2088,10 +2088,6 @@ i32.shl local.tee $4 i32.eqz - local.get $1 - i32.const 1 - i32.shl - local.tee $3 local.get $0 i32.const 20 i32.sub @@ -2101,7 +2097,11 @@ i32.const 1 i32.shl local.tee $5 - i32.lt_u + local.get $1 + i32.const 1 + i32.shl + local.tee $3 + i32.gt_u select if local.get $0 @@ -2114,12 +2114,12 @@ i32.const 1 call $~lib/rt/pure/__new local.set $1 + local.get $4 local.get $3 local.get $5 i32.sub local.tee $3 - local.get $4 - i32.gt_u + i32.lt_u if local.get $1 local.get $2 @@ -2176,10 +2176,6 @@ i32.shl local.tee $3 i32.eqz - local.get $1 - i32.const 1 - i32.shl - local.tee $4 local.get $0 i32.const 20 i32.sub @@ -2188,8 +2184,12 @@ i32.shr_u i32.const 1 i32.shl - local.tee $1 - i32.lt_u + local.tee $4 + local.get $1 + i32.const 1 + i32.shl + local.tee $5 + i32.gt_u select if local.get $0 @@ -2198,24 +2198,24 @@ call $~lib/rt/pure/__release return end - local.get $4 + local.get $5 i32.const 1 call $~lib/rt/pure/__new - local.tee $5 + local.tee $1 local.get $0 - local.get $1 + local.get $4 call $~lib/memory/memory.copy + local.get $3 + local.get $5 local.get $4 - local.get $1 i32.sub local.tee $0 - local.get $3 - i32.gt_u + i32.lt_u if local.get $1 - local.get $5 + local.get $4 i32.add - local.tee $1 + local.tee $4 local.get $2 local.get $3 local.get $0 @@ -2223,28 +2223,28 @@ i32.sub local.get $3 i32.div_u - local.tee $4 + local.tee $5 call $~lib/memory/memory.repeat - local.get $1 - local.get $3 local.get $4 + local.get $3 + local.get $5 i32.mul - local.tee $1 + local.tee $3 i32.add local.get $2 local.get $0 - local.get $1 + local.get $3 i32.sub call $~lib/memory/memory.copy else local.get $1 - local.get $5 + local.get $4 i32.add local.get $2 local.get $0 call $~lib/memory/memory.copy end - local.get $5 + local.get $1 call $~lib/rt/pure/__retain local.get $2 call $~lib/rt/pure/__release @@ -2368,9 +2368,9 @@ call $~lib/rt/pure/__release i32.const 1 i32.const -1 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select return end @@ -2608,9 +2608,9 @@ end end loop $while-continue|1 - local.get $2 local.get $1 - i32.lt_u + local.get $2 + i32.gt_u if (result i32) local.get $0 local.get $2 @@ -2859,6 +2859,7 @@ local.set $0 local.get $2 if + local.get $1 local.get $4 i32.load16_u local.tee $2 @@ -2892,8 +2893,7 @@ select end local.tee $2 - local.get $1 - i32.ge_u + i32.le_u if local.get $6 i64.reinterpret_f64 @@ -3094,6 +3094,7 @@ local.set $0 local.get $1 if + local.get $6 local.get $3 i32.load16_u local.tee $1 @@ -3127,8 +3128,7 @@ select end local.tee $1 - local.get $6 - i32.ge_u + i32.le_u if local.get $5 i32.eqz @@ -3311,6 +3311,7 @@ local.set $0 local.get $1 if + local.get $6 local.get $3 i32.load16_u local.tee $1 @@ -3344,8 +3345,7 @@ select end local.tee $1 - local.get $6 - i32.ge_u + i32.le_u if local.get $5 i64.eqz @@ -3799,9 +3799,9 @@ select i32.const 19 local.get $1 - i32.const 19 local.get $1 - i32.lt_s + i32.const 19 + i32.gt_s select i32.sub block $~lib/util/string/parseExp|inlined.0 (result i32) @@ -4307,8 +4307,6 @@ local.tee $0 i32.eqz if - local.get $1 - call $~lib/rt/pure/__release i32.const 1328 local.set $0 br $__inlined_func$~lib/string/String#concat @@ -4327,9 +4325,9 @@ local.get $1 local.get $6 call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release end + local.get $1 + call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release local.get $5 @@ -4472,9 +4470,9 @@ local.get $1 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select call $~lib/util/string/compareImpl i32.const 0 @@ -4596,21 +4594,21 @@ call $~lib/rt/pure/__retain local.set $2 block $folding-inner0 - local.get $0 + local.get $1 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $3 - local.get $1 + local.tee $5 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $5 - i32.le_u + local.tee $3 + i32.ge_u if local.get $3 local.get $5 @@ -4856,6 +4854,7 @@ i32.const 1 i32.and if + local.get $5 local.get $4 i32.const 4 i32.add @@ -4864,8 +4863,7 @@ i32.and i32.add local.tee $4 - local.get $5 - i32.ge_u + i32.le_u if local.get $3 local.get $7 @@ -4921,21 +4919,21 @@ call $~lib/rt/pure/__retain local.set $5 block $folding-inner1 (result i32) - local.get $0 + local.get $7 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $4 - local.get $7 + local.tee $10 + local.get $0 i32.const 20 i32.sub i32.load offset=16 i32.const 1 i32.shr_u - local.tee $10 - i32.le_u + local.tee $4 + i32.ge_u if local.get $4 local.get $10 @@ -4992,9 +4990,9 @@ local.get $2 local.set $1 loop $for-loop|0 - local.get $9 local.get $4 - i32.lt_u + local.get $9 + i32.gt_u if local.get $3 local.get $1 @@ -5099,9 +5097,9 @@ call $~lib/rt/pure/__new local.set $3 end - local.get $8 local.get $1 - i32.gt_u + local.get $8 + i32.lt_u if local.get $3 local.get $1 @@ -5156,9 +5154,9 @@ end local.get $8 if - local.get $8 local.get $1 - i32.gt_u + local.get $8 + i32.lt_u if local.get $3 local.get $1 @@ -5378,9 +5376,9 @@ i32.const 1 i32.shr_u local.tee $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select local.tee $3 local.get $2 @@ -5391,23 +5389,23 @@ select local.tee $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select local.tee $2 - local.get $3 local.get $2 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -5786,9 +5784,9 @@ br_if $folding-inner0 local.get $3 local.get $2 - local.get $3 local.get $2 - i32.lt_s + local.get $3 + i32.gt_s select local.tee $2 call $~lib/rt/__newArray @@ -5797,9 +5795,9 @@ i32.load offset=4 local.set $3 loop $for-loop|0 - local.get $6 local.get $2 - i32.lt_s + local.get $6 + i32.gt_s if i32.const 2 i32.const 1 @@ -6022,16 +6020,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -6040,11 +6029,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -6255,16 +6249,16 @@ i32.const 2576 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u local.tee $2 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end + select + local.set $0 local.get $1 i32.const 10 i32.eq @@ -6465,17 +6459,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -6484,11 +6468,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -6655,17 +6645,17 @@ i32.const 2576 return end + i64.const 0 + local.get $0 + i64.sub + local.get $0 local.get $0 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $2 - if - i64.const 0 - local.get $0 - i64.sub - local.set $0 - end + select + local.set $0 local.get $1 i32.const 10 i32.eq @@ -6984,11 +6974,11 @@ i64.lt_u select i32.const 0 + local.get $2 local.get $4 local.get $0 i64.sub - local.get $2 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $8 @@ -7058,12 +7048,12 @@ i32.const 1 i32.sub local.set $7 + local.get $4 local.get $2 local.get $11 i64.and local.tee $6 - local.get $4 - i64.ge_u + i64.le_u br_if $while-continue|4 end local.get $7 @@ -7103,16 +7093,16 @@ local.get $2 i64.sub i64.gt_u - local.get $6 local.get $2 - i64.lt_u + local.get $6 + i64.gt_u select i32.const 0 + local.get $10 local.get $4 local.get $0 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $0 local.get $2 @@ -7230,9 +7220,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -7716,8 +7706,8 @@ (local $5 i32) (local $6 i32) (local $7 i32) - (local $8 f32) - (local $9 i32) + (local $8 i32) + (local $9 f32) (local $10 i32) (local $11 i32) (local $12 i32) @@ -8073,7 +8063,6 @@ end block $__inlined_func$~lib/string/String#charCodeAt (result i32) i32.const -1 - i32.const 0 global.get $std/string/str local.tee $0 i32.const 20 @@ -8081,7 +8070,7 @@ i32.load offset=16 i32.const 1 i32.shr_u - i32.ge_u + i32.eqz br_if $__inlined_func$~lib/string/String#charCodeAt drop local.get $0 @@ -8132,7 +8121,7 @@ global.set $~argumentsLength i32.const 0 call $~lib/string/String.fromCharCode@varargs - local.tee $9 + local.tee $10 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8148,7 +8137,7 @@ global.set $~argumentsLength i32.const 54 call $~lib/string/String.fromCharCode@varargs - local.tee $10 + local.tee $11 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8164,7 +8153,7 @@ global.set $~argumentsLength i32.const 65590 call $~lib/string/String.fromCharCode@varargs - local.tee $11 + local.tee $12 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8179,7 +8168,7 @@ i32.const 55296 i32.const 57088 call $~lib/string/String.fromCharCode - local.tee $12 + local.tee $13 i32.const 1584 call $~lib/string/String.__eq i32.eqz @@ -8193,7 +8182,7 @@ end i32.const 0 call $~lib/string/String.fromCodePoint - local.tee $13 + local.tee $14 i32.const 1360 call $~lib/string/String.__eq i32.eqz @@ -8207,7 +8196,7 @@ end i32.const 54 call $~lib/string/String.fromCodePoint - local.tee $14 + local.tee $15 i32.const 1552 call $~lib/string/String.__eq i32.eqz @@ -8221,7 +8210,7 @@ end i32.const 119558 call $~lib/string/String.fromCodePoint - local.tee $15 + local.tee $16 i32.const 1664 call $~lib/string/String.__eq i32.eqz @@ -8249,9 +8238,9 @@ i32.load offset=16 i32.const 1 i32.shr_u - local.tee $0 - local.set $4 - local.get $0 + local.tee $5 + local.set $6 + local.get $5 i32.const 0 local.get $2 i32.const 20 @@ -8260,11 +8249,9 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 0 local.get $0 - i32.lt_s select - local.tee $5 + local.tee $4 i32.add local.get $0 i32.gt_s @@ -8275,9 +8262,9 @@ br $__inlined_func$~lib/string/String#startsWith end local.get $2 - local.get $5 - i32.const 1696 local.get $4 + i32.const 1696 + local.get $6 call $~lib/util/string/compareImpl i32.eqz i32.const 1696 @@ -8309,9 +8296,9 @@ i32.const 1 i32.shr_u local.tee $5 - i32.const 536870910 local.get $5 - i32.lt_s + i32.const 536870910 + i32.gt_u select local.get $2 i32.sub @@ -8398,7 +8385,7 @@ i32.const 3 i32.const 1824 call $~lib/string/String#padStart - local.tee $16 + local.tee $6 i32.const 1856 call $~lib/string/String.__eq i32.eqz @@ -9626,11 +9613,11 @@ i32.const 0 call $~lib/util/string/strtol f32.demote_f64 - local.set $8 + local.set $9 i32.const 3728 call $~lib/rt/pure/__release - local.get $8 - local.get $8 + local.get $9 + local.get $9 f32.eq if i32.const 0 @@ -11861,9 +11848,9 @@ call $~lib/string/String.fromCodePoint local.tee $2 call $~lib/string/String.__concat - local.tee $6 - call $~lib/rt/pure/__retain local.tee $7 + call $~lib/rt/pure/__retain + local.tee $8 call $~lib/string/String.__gt i32.eqz if @@ -11880,10 +11867,10 @@ call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release i32.const 1948 i32.load i32.const 1 @@ -11901,7 +11888,7 @@ i32.const 1328 i32.const 100 call $~lib/string/String#repeat - local.tee $6 + local.tee $7 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -11916,7 +11903,7 @@ i32.const 1392 i32.const 0 call $~lib/string/String#repeat - local.tee $7 + local.tee $8 i32.const 1328 call $~lib/string/String.__eq i32.eqz @@ -16659,8 +16646,6 @@ end global.get $std/string/str call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release local.get $11 @@ -16673,11 +16658,13 @@ call $~lib/rt/pure/__release local.get $15 call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release local.get $4 call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $16 + local.get $6 call $~lib/rt/pure/__release local.get $17 call $~lib/rt/pure/__release @@ -16737,9 +16724,9 @@ call $~lib/rt/pure/__release local.get $44 call $~lib/rt/pure/__release - local.get $7 + local.get $8 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $47 call $~lib/rt/pure/__release @@ -17266,9 +17253,10 @@ (local $2 i32) (local $3 i32) (local $4 i32) + (local $5 i32) local.get $0 i32.load offset=4 - local.tee $2 + local.tee $4 i32.const 268435455 i32.and local.set $1 @@ -17294,13 +17282,16 @@ block $switch$1$case$5 block $switch$1$case$4 local.get $0 - i32.const 12 + i32.const 20 i32.add + local.tee $2 + i32.const 8 + i32.sub i32.load br_table $__inlined_func$~lib/rt/__visit_members $__inlined_func$~lib/rt/__visit_members $switch$1$case$4 $switch$1$case$5 $switch$1$case$6 $switch$1$default end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load local.tee $1 if local.get $1 @@ -17308,47 +17299,48 @@ end br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=24 + local.get $2 local.tee $1 - local.get $0 - i32.load offset=32 + i32.load offset=4 + local.tee $3 + local.get $1 + i32.load offset=12 i32.const 2 i32.shl i32.add - local.set $3 + local.set $2 loop $while-continue|0 - local.get $1 + local.get $2 local.get $3 - i32.lt_u + i32.gt_u if - local.get $1 + local.get $3 i32.load - local.tee $4 + local.tee $5 if - local.get $4 + local.get $5 call $~lib/rt/pure/__visit end - local.get $1 + local.get $3 i32.const 4 i32.add - local.set $1 + local.set $3 br $while-continue|0 end end - local.get $0 - i32.load offset=20 + local.get $1 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end - local.get $0 - i32.load offset=20 + local.get $2 + i32.load call $~lib/rt/pure/__visit br $__inlined_func$~lib/rt/__visit_members end unreachable end - local.get $2 + local.get $4 i32.const -2147483648 i32.and if @@ -17364,8 +17356,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1200 @@ -17378,7 +17369,7 @@ local.get $1 i32.const 1 i32.sub - local.get $2 + local.get $4 i32.const -268435456 i32.and i32.or diff --git a/tests/compiler/std/symbol.optimized.wat b/tests/compiler/std/symbol.optimized.wat index b30c054363..f9727bd33a 100644 --- a/tests/compiler/std/symbol.optimized.wat +++ b/tests/compiler/std/symbol.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_=>_none (func (param i32 i32))) (type $i32_=>_i32 (func (param i32) (result i32))) + (type $i32_i32_=>_none (func (param i32 i32))) (type $none_=>_none (func)) (type $none_=>_i32 (func (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) + (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\06\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\06\00\00\001\002\003") @@ -124,9 +124,9 @@ i32.const 16 i32.shr_u local.tee $3 - local.get $5 local.get $3 - i32.gt_s + local.get $5 + i32.lt_s select memory.grow i32.const 0 @@ -384,84 +384,10 @@ end local.get $1 ) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -491,10 +417,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -654,93 +652,6 @@ i32.load offset=20 i32.store offset=16 ) - (func $~lib/map/Map<~lib/string/String,usize>#set (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 1056 - call $~lib/util/hash/hashStr - local.tee $3 - call $~lib/map/Map<~lib/string/String,usize>#find - local.tee $2 - if - local.get $2 - local.get $1 - i32.store offset=4 - else - local.get $0 - i32.load offset=16 - local.get $0 - i32.load offset=12 - i32.eq - if - local.get $0 - local.get $0 - i32.load offset=20 - local.get $0 - i32.load offset=12 - i32.const 3 - i32.mul - i32.const 4 - i32.div_s - i32.lt_s - if (result i32) - local.get $0 - i32.load offset=4 - else - local.get $0 - i32.load offset=4 - i32.const 1 - i32.shl - i32.const 1 - i32.or - end - call $~lib/map/Map<~lib/string/String,usize>#rehash - end - local.get $0 - i32.load offset=8 - local.get $0 - local.get $0 - i32.load offset=16 - local.tee $4 - i32.const 1 - i32.add - i32.store offset=16 - local.get $4 - i32.const 12 - i32.mul - i32.add - local.tee $2 - i32.const 1056 - i32.store - local.get $2 - local.get $1 - i32.store offset=4 - local.get $0 - local.get $0 - i32.load offset=20 - i32.const 1 - i32.add - i32.store offset=20 - local.get $2 - local.get $0 - i32.load - local.get $3 - local.get $0 - i32.load offset=4 - i32.and - i32.const 2 - i32.shl - i32.add - local.tee $0 - i32.load - i32.store offset=8 - local.get $0 - local.get $2 - i32.store - end - ) (func $~lib/util/hash/hash32 (param $0 i32) (result i32) local.get $0 i32.const 255 @@ -1022,6 +933,10 @@ ) (func $~lib/symbol/_Symbol.for (result i32) (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) global.get $~lib/symbol/stringToId if global.get $~lib/symbol/stringToId @@ -1110,8 +1025,88 @@ unreachable end global.get $~lib/symbol/stringToId - local.get $0 - call $~lib/map/Map<~lib/string/String,usize>#set + local.tee $1 + i32.const 1056 + call $~lib/util/hash/hashStr + local.tee $3 + call $~lib/map/Map<~lib/string/String,usize>#find + local.tee $2 + if + local.get $2 + local.get $0 + i32.store offset=4 + else + local.get $1 + i32.load offset=16 + local.get $1 + i32.load offset=12 + i32.eq + if + local.get $1 + local.get $1 + i32.load offset=20 + local.get $1 + i32.load offset=12 + i32.const 3 + i32.mul + i32.const 4 + i32.div_s + i32.lt_s + if (result i32) + local.get $1 + i32.load offset=4 + else + local.get $1 + i32.load offset=4 + i32.const 1 + i32.shl + i32.const 1 + i32.or + end + call $~lib/map/Map<~lib/string/String,usize>#rehash + end + local.get $1 + i32.load offset=8 + local.get $1 + local.get $1 + i32.load offset=16 + local.tee $2 + i32.const 1 + i32.add + i32.store offset=16 + local.get $2 + i32.const 12 + i32.mul + i32.add + local.tee $2 + i32.const 1056 + i32.store + local.get $2 + local.get $0 + i32.store offset=4 + local.get $1 + local.get $1 + i32.load offset=20 + i32.const 1 + i32.add + i32.store offset=20 + local.get $2 + local.get $1 + i32.load + local.get $3 + local.get $1 + i32.load offset=4 + i32.and + i32.const 2 + i32.shl + i32.add + local.tee $1 + i32.load + i32.store offset=8 + local.get $1 + local.get $2 + i32.store + end global.get $~lib/symbol/idToString local.get $0 call $~lib/map/Map#set diff --git a/tests/compiler/std/typedarray.optimized.wat b/tests/compiler/std/typedarray.optimized.wat index 17dfd3ff22..2bcb6d54c4 100644 --- a/tests/compiler/std/typedarray.optimized.wat +++ b/tests/compiler/std/typedarray.optimized.wat @@ -1,12 +1,12 @@ (module (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_none (func (param i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) + (type $i32_=>_none (func (param i32))) (type $i64_i32_i32_=>_i32 (func (param i64 i32 i32) (result i32))) (type $f32_i32_i32_=>_i32 (func (param f32 i32 i32) (result i32))) (type $f64_i32_i32_=>_i32 (func (param f64 i32 i32) (result i32))) @@ -397,7 +397,7 @@ (data (i32.const 12972) "\n\00\00\00\01") (data (i32.const 12988) "\n\00\00\00\01\ffd\ff\00\00d\n\ff") (table $0 123 funcref) - (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) + (elem (i32.const 1) $~lib/util/sort/COMPARATOR~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testReduce<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int16Array,i16>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int32Array,i32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Int64Array,i64>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float32Array,f32>~anonymous|1 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayFindIndex<~lib/typedarray/Float64Array,f64>~anonymous|1 $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Uint8Array,u8>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayEvery<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int8Array,i8>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int16Array,i16>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int32Array,i32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Int64Array,i64>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float32Array,f32>~anonymous|0 $std/typedarray/testArrayForEach<~lib/typedarray/Float64Array,f64>~anonymous|0) (global $~lib/rt/tlsf/ROOT (mut i32) (i32.const 0)) (global $~argumentsLength (mut i32) (i32.const 0)) (global $std/typedarray/forEachCallCount (mut i32) (i32.const 0)) @@ -971,10 +971,10 @@ (func $~lib/rt/tlsf/initialize (local $0 i32) (local $1 i32) - i32.const 1 memory.size local.tee $0 - i32.gt_s + i32.const 1 + i32.lt_s if (result i32) i32.const 1 local.get $0 @@ -1363,12 +1363,12 @@ unreachable end end + local.get $2 local.get $1 i32.load i32.const -4 i32.and - local.get $2 - i32.lt_u + i32.gt_u if i32.const 0 i32.const 1296 @@ -2441,9 +2441,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -2552,9 +2552,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -2566,91 +2566,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/util/sort/insertionSort (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) - local.get $2 - call $~lib/rt/pure/__retain - local.set $5 - loop $for-loop|0 - local.get $4 - local.get $1 - i32.lt_s - if - local.get $0 - local.get $4 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $6 - local.get $4 - i32.const 1 - i32.sub - local.set $2 - loop $while-continue|1 - local.get $2 - i32.const 0 - i32.ge_s - if - block $while-break|1 - local.get $0 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 2 - global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $5 - i32.load - call_indirect (type $f64_f64_=>_i32) - i32.const 0 - i32.ge_s - br_if $while-break|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $0 - local.get $3 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - br $while-continue|1 - end - end - end - local.get $0 - local.get $2 - i32.const 1 - i32.add - i32.const 3 - i32.shl - i32.add - local.get $6 - f64.store - local.get $4 - i32.const 1 - i32.add - local.set $4 - br $for-loop|0 - end - end - local.get $5 - call $~lib/rt/pure/__release - ) (func $~lib/rt/tlsf/checkUsedBlock (param $0 i32) (result i32) (local $1 i32) local.get $0 @@ -2847,6 +2762,7 @@ i32.const 1 local.set $1 loop $while-continue|3 + local.get $3 local.get $4 local.get $1 i32.const 5 @@ -2864,8 +2780,7 @@ i32.shl i32.add local.tee $2 - local.get $3 - i32.lt_s + i32.gt_s if local.get $2 local.set $1 @@ -2968,21 +2883,25 @@ (func $~lib/typedarray/Float64Array#sort (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - (local $7 f64) + (local $4 f64) + (local $5 f64) + (local $6 i32) + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 i32) local.get $1 call $~lib/rt/pure/__retain - local.set $5 + local.set $10 local.get $0 call $~lib/rt/pure/__retain - local.set $2 - local.get $5 + local.set $7 + local.get $10 call $~lib/rt/pure/__retain - local.set $3 + local.set $8 block $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 + local.get $7 i32.load offset=8 i32.const 3 i32.shr_u @@ -2990,7 +2909,7 @@ i32.const 1 i32.le_u br_if $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 - local.get $2 + local.get $7 i32.load offset=4 local.set $1 local.get $0 @@ -2999,54 +2918,132 @@ if local.get $1 f64.load offset=8 - local.set $6 + local.set $4 local.get $1 f64.load - local.set $7 + local.set $5 i32.const 2 global.set $~argumentsLength - local.get $6 - local.get $7 - local.get $3 + local.get $4 + local.get $5 + local.get $8 i32.load call_indirect (type $f64_f64_=>_i32) i32.const 0 i32.lt_s if local.get $1 - local.get $7 + local.get $5 f64.store offset=8 local.get $1 - local.get $6 + local.get $4 f64.store end br $~lib/typedarray/SORT<~lib/typedarray/Float64Array,f64>|inlined.0 end - local.get $3 + local.get $8 call $~lib/rt/pure/__retain - local.set $4 + local.set $9 local.get $0 i32.const 256 i32.lt_s if local.get $1 + local.set $2 local.get $0 - local.get $4 - call $~lib/util/sort/insertionSort + local.set $3 + local.get $9 + call $~lib/rt/pure/__retain + local.set $11 + loop $for-loop|0 + local.get $3 + local.get $6 + i32.gt_s + if + local.get $2 + local.get $6 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $4 + local.get $6 + i32.const 1 + i32.sub + local.set $0 + loop $while-continue|1 + local.get $0 + i32.const 0 + i32.ge_s + if + block $while-break|1 + local.get $2 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $5 + i32.const 2 + global.set $~argumentsLength + local.get $4 + local.get $5 + local.get $11 + i32.load + call_indirect (type $f64_f64_=>_i32) + i32.const 0 + i32.ge_s + br_if $while-break|1 + local.get $0 + local.tee $1 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + local.get $1 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $5 + f64.store + br $while-continue|1 + end + end + end + local.get $2 + local.get $0 + i32.const 1 + i32.add + i32.const 3 + i32.shl + i32.add + local.get $4 + f64.store + local.get $6 + i32.const 1 + i32.add + local.set $6 + br $for-loop|0 + end + end + local.get $11 + call $~lib/rt/pure/__release else local.get $1 local.get $0 - local.get $4 + local.get $9 call $~lib/util/sort/weakHeapSort end - local.get $4 + local.get $9 call $~lib/rt/pure/__release end - local.get $3 + local.get $8 call $~lib/rt/pure/__release - local.get $5 + local.get $10 call $~lib/rt/pure/__release - local.get $2 + local.get $7 ) (func $~lib/util/sort/COMPARATOR~anonymous|0 (param $0 f64) (param $1 f64) (result i32) (local $2 i64) @@ -3606,9 +3603,9 @@ local.get $2 local.get $1 local.get $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select local.get $0 i32.sub @@ -3650,9 +3647,9 @@ else local.get $2 local.get $1 - local.get $2 local.get $1 - i32.lt_s + local.get $2 + i32.gt_s select end local.set $0 @@ -3672,9 +3669,9 @@ else local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select end local.set $1 @@ -3962,9 +3959,9 @@ local.get $1 i32.sub local.tee $0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s select i32.const 2 i32.shl @@ -4521,350 +4518,133 @@ local.get $0 i32.mul ) - (func $~lib/typedarray/Int8Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3456 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 3 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_s - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end + i32.ge_u + if + i32.const 1424 + i32.const 1488 + i32.const 152 + i32.const 45 + call $~lib/builtins/abort + unreachable end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 + local.get $1 local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3456 - call $~lib/rt/pure/__release + i32.load offset=4 + i32.add + i32.load8_u ) - (func $~lib/typedarray/Uint8Array#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3488 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 4 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_u - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end + i32.const 1 + i32.shr_u + i32.ge_u + if + i32.const 1424 + i32.const 1488 + i32.const 408 + i32.const 64 + call $~lib/builtins/abort + unreachable end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3488 - call $~lib/rt/pure/__release + i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s ) - (func $~lib/typedarray/Uint8Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) local.get $1 local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u i32.ge_u if i32.const 1424 i32.const 1488 - i32.const 152 - i32.const 45 + i32.const 536 + i32.const 64 call $~lib/builtins/abort unreachable end - local.get $1 local.get $0 i32.load offset=4 + local.get $1 + i32.const 1 + i32.shl i32.add - i32.load8_u + i32.load16_u ) - (func $~lib/typedarray/Uint8ClampedArray#map (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) + local.get $1 local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3520 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 i32.load offset=8 - local.set $0 - local.get $2 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 5 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $1 - local.get $0 - i32.lt_s - if - local.get $1 - local.get $6 - i32.add - i32.load8_u - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $4 - i32.add - local.get $7 - local.get $1 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end + i32.const 2 + i32.shr_u + i32.ge_u + if + i32.const 1424 + i32.const 1488 + i32.const 792 + i32.const 64 + call $~lib/builtins/abort + unreachable end - local.get $3 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $3 - local.get $4 - i32.store offset=4 - local.get $3 local.get $0 - i32.store offset=8 - local.get $3 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3520 - call $~lib/rt/pure/__release + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + i32.load ) - (func $~lib/typedarray/Int16Array#map (param $0 i32) (result i32) - (local $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) + (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3552 - call $~lib/rt/pure/__retain - local.set $5 + local.get $0 + i64.mul + ) + (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 + local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 6 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s - if - local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_s - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store16 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end + i32.ge_u + if + i32.const 1424 + i32.const 1488 + i32.const 920 + i32.const 64 + call $~lib/builtins/abort + unreachable end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release + local.get $0 + i32.load offset=4 local.get $1 - call $~lib/rt/pure/__release - i32.const 3552 - call $~lib/rt/pure/__release + i32.const 3 + i32.shl + i32.add + i64.load ) - (func $~lib/typedarray/Int16Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) local.get $1 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.ge_u if i32.const 1424 i32.const 1488 - i32.const 408 + i32.const 1048 i32.const 64 call $~lib/builtins/abort unreachable @@ -4872,108 +4652,27 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_s + i64.load ) - (func $~lib/typedarray/Uint16Array#map (param $0 i32) (result i32) - (local $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) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3584 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 7 - call $~lib/rt/pure/__new - local.set $2 local.get $0 - i32.const 1 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s - if - local.get $6 - local.get $3 - i32.const 1 - i32.shl - local.tee $8 - i32.add - i32.load16_u - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store16 - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3584 - call $~lib/rt/pure/__release + f32.mul ) - (func $~lib/typedarray/Uint16Array#__get (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) local.get $1 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.ge_u if i32.const 1424 i32.const 1488 - i32.const 536 + i32.const 1176 i32.const 64 call $~lib/builtins/abort unreachable @@ -4981,13 +4680,51 @@ local.get $0 i32.load offset=4 local.get $1 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u + f32.load ) - (func $~lib/typedarray/Int32Array#map (param $0 i32) (result i32) - (local $1 i32) + (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) + local.get $0 + local.get $0 + f64.mul + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + i32.const 2 + i32.gt_s + ) + (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + local.get $2 + call $~lib/rt/tlsf/allocateBlock + local.tee $2 + i32.const 4 + i32.add + local.get $1 + i32.const 4 + i32.add + local.get $1 + i32.load + i32.const -4 + i32.and + call $~lib/memory/memory.copy + local.get $1 + i32.const 13004 + i32.ge_u + if + local.get $0 + local.get $1 + call $~lib/rt/tlsf/freeBlock + end + local.get $2 + ) + (func $~lib/rt/pure/__renew (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -4995,84 +4732,124 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3616 - call $~lib/rt/pure/__retain - local.set $5 local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u + i32.const 1073741804 + i32.gt_u + if + i32.const 1168 + i32.const 1232 + i32.const 288 + i32.const 30 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 16 + i32.sub local.set $0 + global.get $~lib/rt/tlsf/ROOT + i32.eqz + if + call $~lib/rt/tlsf/initialize + end local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 8 - call $~lib/rt/pure/__new + i32.const 16 + i32.add local.set $2 local.get $0 - i32.const 2 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $3 + i32.const 13004 + i32.lt_u + if + global.get $~lib/rt/tlsf/ROOT local.get $0 - i32.lt_s - if - local.get $6 - local.get $3 - i32.const 2 - i32.shl - local.tee $8 - i32.add - i32.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 + call $~lib/rt/tlsf/checkUsedBlock + local.get $2 + call $~lib/rt/tlsf/moveBlock + local.set $0 + else + block $__inlined_func$~lib/rt/tlsf/reallocateBlock + global.get $~lib/rt/tlsf/ROOT + local.set $3 + local.get $0 + call $~lib/rt/tlsf/checkUsedBlock + local.set $0 + block $folding-inner0 + local.get $2 + call $~lib/rt/tlsf/prepareSize + local.tee $5 + local.get $0 + i32.load + local.tee $6 + i32.const -4 + i32.and + local.tee $4 + i32.le_u + br_if $folding-inner0 + local.get $0 + i32.const 4 + i32.add + local.get $0 + i32.load + i32.const -4 + i32.and + i32.add + local.tee $7 + i32.load + local.tee $8 + i32.const 1 + i32.and + if + local.get $5 + local.get $4 + i32.const 4 + i32.add + local.get $8 + i32.const -4 + i32.and + i32.add + local.tee $4 + i32.le_u + if + local.get $3 + local.get $7 + call $~lib/rt/tlsf/removeBlock + local.get $0 + local.get $4 + local.get $6 + i32.const 3 + i32.and + i32.or + i32.store + br $folding-inner0 + end + end + local.get $3 + local.get $0 + local.get $2 + call $~lib/rt/tlsf/moveBlock + local.set $0 + br $__inlined_func$~lib/rt/tlsf/reallocateBlock + end local.get $3 - local.get $1 + local.get $0 local.get $5 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - i32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 + call $~lib/rt/tlsf/prepareBlock end end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release + local.get $0 + i32.const 4 + i32.add + local.tee $0 + i32.const 4 + i32.sub local.get $1 - call $~lib/rt/pure/__release - i32.const 3616 - call $~lib/rt/pure/__release + i32.store offset=16 + local.get $0 + i32.const 16 + i32.add ) - (func $~lib/typedarray/Uint32Array#map (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5082,111 +4859,194 @@ (local $7 i32) (local $8 i32) (local $9 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3648 + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Int8Array#constructor + local.tee $3 call $~lib/rt/pure/__retain - local.set $5 + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set local.get $1 - i32.load offset=8 + i32.const 1 i32.const 2 - i32.shr_u - local.set $0 + call $~lib/typedarray/Int8Array#__set local.get $1 - i32.load offset=4 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $1 + local.set $2 + i32.const 0 + local.set $0 + i32.const 0 local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 + i32.const 3808 + call $~lib/rt/pure/__retain + local.set $7 + local.get $4 + i32.load offset=8 + local.set $2 i32.const 12 - i32.const 9 + i32.const 3 call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 2 - i32.shl - local.tee $7 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $4 + local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s + local.get $2 + local.get $6 + i32.gt_s if local.get $6 - local.get $3 - i32.const 2 - i32.shl - local.tee $8 + local.get $10 i32.add - i32.load + i32.load8_s local.set $9 i32.const 3 global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add local.get $9 - local.get $3 - local.get $1 - local.get $5 + local.get $6 + local.get $4 + local.get $7 i32.load call_indirect (type $i32_i32_i32_=>_i32) - i32.store - local.get $3 + if + local.get $0 + local.get $8 + i32.add + local.get $9 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + end + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $5 + local.get $8 + local.get $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 + local.get $5 + local.get $0 i32.store offset=8 + local.get $5 local.get $2 - call $~lib/rt/pure/__retain + i32.store offset=4 local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - i32.const 3648 + i32.const 3808 call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#__get (param $0 i32) (param $1 i32) (result i32) - local.get $1 + local.tee $0 + i32.load offset=4 local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u + i32.load + i32.sub if - i32.const 1424 - i32.const 1488 - i32.const 792 - i32.const 64 + i32.const 0 + i32.const 1360 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.load offset=8 + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 391 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 3 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 393 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 i32.const 2 - i32.shl - i32.add - i32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i64) + call $~lib/typedarray/Int8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.mul + i32.const 255 + i32.and + i32.const 2 + i32.gt_u ) - (func $~lib/typedarray/Int64Array#map (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5195,107 +5055,188 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3680 + (local $9 i32) + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Uint8Array#constructor + local.tee $3 call $~lib/rt/pure/__retain - local.set $5 + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.load offset=8 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 i32.const 3 - i32.shr_u - local.set $0 + call $~lib/typedarray/Uint8Array#__set local.get $1 - i32.load offset=4 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + local.set $2 + i32.const 0 + local.set $0 + i32.const 0 local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 + i32.const 3840 + call $~lib/rt/pure/__retain + local.set $7 + local.get $4 + i32.load offset=8 + local.set $2 i32.const 12 - i32.const 10 + i32.const 4 call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $4 + local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s + local.get $2 + local.get $6 + i32.gt_s if local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 + local.get $10 i32.add - i64.load + i32.load8_u local.set $9 i32.const 3 global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add local.get $9 - local.get $3 - local.get $1 - local.get $5 + local.get $6 + local.get $4 + local.get $7 i32.load - call_indirect (type $i64_i32_i32_=>_i64) - i64.store - local.get $3 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $0 + local.get $8 + i32.add + local.get $9 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + end + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $5 + local.get $8 + local.get $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 + local.get $5 + local.get $0 i32.store offset=8 + local.get $5 local.get $2 - call $~lib/rt/pure/__retain + i32.store offset=4 local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - i32.const 3680 + i32.const 3840 call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 + local.tee $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + if + i32.const 0 + i32.const 1360 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u - i32.ge_u + i32.ne if - i32.const 1424 - i32.const 1488 - i32.const 920 - i32.const 64 + i32.const 0 + i32.const 1360 + i32.const 391 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get i32.const 3 - i32.shl - i32.add - i64.load + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint64Array#map (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (local $0 i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5304,112 +5245,196 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 i64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3712 + (local $9 i32) + (local $10 i32) + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $3 call $~lib/rt/pure/__retain - local.set $5 + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.load offset=8 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 i32.const 3 - i32.shr_u - local.set $0 + call $~lib/typedarray/Uint8ClampedArray#__set local.get $1 - i32.load offset=4 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 5 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + local.set $2 + i32.const 0 + local.set $0 + i32.const 0 local.set $6 + local.get $2 + call $~lib/rt/pure/__retain + local.set $4 + i32.const 3872 + call $~lib/rt/pure/__retain + local.set $7 + local.get $4 + i32.load offset=8 + local.set $2 i32.const 12 - i32.const 11 + i32.const 5 call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 + local.set $5 + local.get $2 i32.const 0 call $~lib/rt/pure/__new - local.set $4 + local.set $8 + local.get $4 + i32.load offset=4 + local.set $10 loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s + local.get $2 + local.get $6 + i32.gt_s if local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 + local.get $10 i32.add - i64.load + i32.load8_u local.set $9 i32.const 3 global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add local.get $9 - local.get $3 - local.get $1 - local.get $5 + local.get $6 + local.get $4 + local.get $7 i32.load - call_indirect (type $i64_i32_i32_=>_i64) - i64.store - local.get $3 + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $0 + local.get $8 + i32.add + local.get $9 + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + end + local.get $6 i32.const 1 i32.add - local.set $3 + local.set $6 br $for-loop|0 end end - local.get $2 - local.get $4 + local.get $5 + local.get $8 + local.get $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 + local.get $5 + local.get $0 i32.store offset=8 + local.get $5 local.get $2 - call $~lib/rt/pure/__retain + i32.store offset=4 local.get $5 + call $~lib/rt/pure/__retain + local.get $7 call $~lib/rt/pure/__release - local.get $1 + local.get $4 call $~lib/rt/pure/__release - i32.const 3712 + i32.const 3872 call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#__get (param $0 i32) (param $1 i32) (result i64) - local.get $1 + local.tee $0 + i32.load offset=4 + local.get $0 + i32.load + i32.sub + if + i32.const 0 + i32.const 1360 + i32.const 390 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 i32.load offset=8 i32.const 3 - i32.shr_u - i32.ge_u + i32.ne if - i32.const 1424 - i32.const 1488 - i32.const 1048 - i32.const 64 + i32.const 0 + i32.const 1360 + i32.const 391 + i32.const 3 call $~lib/builtins/abort unreachable end local.get $0 - i32.load offset=4 - local.get $1 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get i32.const 3 - i32.shl - i32.add - i64.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result f32) + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 392 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 393 + i32.const 3 + call $~lib/builtins/abort + unreachable + end local.get $0 - f32.mul + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 5 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 394 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + i32.const 2 + i32.gt_s ) - (func $~lib/typedarray/Float32Array#map (param $0 i32) (result i32) + (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5418,472 +5443,125 @@ (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) local.get $0 call $~lib/rt/pure/__retain - local.set $1 - i32.const 3744 + local.set $3 + i32.const 3904 call $~lib/rt/pure/__retain local.set $5 - local.get $1 + local.get $3 i32.load offset=8 - i32.const 2 + i32.const 1 i32.shr_u local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 i32.const 12 + i32.const 6 call $~lib/rt/pure/__new - local.set $2 + local.set $4 local.get $0 - i32.const 2 + i32.const 1 i32.shl - local.tee $7 i32.const 0 call $~lib/rt/pure/__new - local.set $4 + local.set $6 + local.get $3 + i32.load offset=4 + local.set $8 loop $for-loop|0 - local.get $3 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if - local.get $6 - local.get $3 - i32.const 2 + local.get $8 + local.get $2 + i32.const 1 i32.shl - local.tee $8 i32.add - f32.load - local.set $9 + i32.load16_s + local.set $7 i32.const 3 global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 + local.get $7 + local.get $2 local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $f32_i32_i32_=>_f32) - f32.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3744 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#__get (param $0 i32) (param $1 i32) (result f32) - local.get $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.ge_u - if - i32.const 1424 - i32.const 1488 - i32.const 1176 - i32.const 64 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - ) - (func $std/typedarray/testArrayMap<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result f64) - local.get $0 - local.get $0 - f64.mul - ) - (func $~lib/typedarray/Float64Array#map (param $0 i32) (result i32) - (local $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 f64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $1 - i32.const 3776 - call $~lib/rt/pure/__retain - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - local.get $1 - i32.load offset=4 - local.set $6 - i32.const 12 - i32.const 13 - call $~lib/rt/pure/__new - local.set $2 - local.get $0 - i32.const 3 - i32.shl - local.tee $7 - i32.const 0 - call $~lib/rt/pure/__new - local.set $4 - loop $for-loop|0 - local.get $3 - local.get $0 - i32.lt_s - if - local.get $6 - local.get $3 - i32.const 3 - i32.shl - local.tee $8 - i32.add - f64.load - local.set $9 - i32.const 3 - global.set $~argumentsLength - local.get $4 - local.get $8 - i32.add - local.get $9 - local.get $3 - local.get $1 - local.get $5 - i32.load - call_indirect (type $f64_i32_i32_=>_f64) - f64.store - local.get $3 - i32.const 1 - i32.add - local.set $3 - br $for-loop|0 - end - end - local.get $2 - local.get $4 - call $~lib/rt/pure/__retain - i32.store - local.get $2 - local.get $4 - i32.store offset=4 - local.get $2 - local.get $7 - i32.store offset=8 - local.get $2 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3776 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - i32.const 2 - i32.gt_s - ) - (func $~lib/rt/tlsf/moveBlock (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - local.get $2 - call $~lib/rt/tlsf/allocateBlock - local.tee $2 - i32.const 4 - i32.add - local.get $1 - i32.const 4 - i32.add - local.get $1 - i32.load - i32.const -4 - i32.and - call $~lib/memory/memory.copy - local.get $1 - i32.const 13004 - i32.ge_u - if - local.get $0 - local.get $1 - call $~lib/rt/tlsf/freeBlock - end - local.get $2 - ) - (func $~lib/rt/pure/__renew (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $1 - i32.const 1073741804 - i32.gt_u - if - i32.const 1168 - i32.const 1232 - i32.const 288 - i32.const 30 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 16 - i32.sub - local.set $0 - global.get $~lib/rt/tlsf/ROOT - i32.eqz - if - call $~lib/rt/tlsf/initialize - end - local.get $1 - i32.const 16 - i32.add - local.set $2 - local.get $0 - i32.const 13004 - i32.lt_u - if - global.get $~lib/rt/tlsf/ROOT - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.get $2 - call $~lib/rt/tlsf/moveBlock - local.set $0 - else - block $__inlined_func$~lib/rt/tlsf/reallocateBlock - global.get $~lib/rt/tlsf/ROOT - local.set $3 - local.get $0 - call $~lib/rt/tlsf/checkUsedBlock - local.set $0 - block $folding-inner0 - local.get $2 - call $~lib/rt/tlsf/prepareSize - local.tee $5 - local.get $0 - i32.load - local.tee $6 - i32.const -4 - i32.and - local.tee $4 - i32.le_u - br_if $folding-inner0 - local.get $0 - i32.const 4 - i32.add - local.get $0 - i32.load - i32.const -4 - i32.and - i32.add - local.tee $7 - i32.load - local.tee $8 - i32.const 1 - i32.and - if - local.get $4 - i32.const 4 - i32.add - local.get $8 - i32.const -4 - i32.and - i32.add - local.tee $4 - local.get $5 - i32.ge_u - if - local.get $3 - local.get $7 - call $~lib/rt/tlsf/removeBlock - local.get $0 - local.get $4 - local.get $6 - i32.const 3 - i32.and - i32.or - i32.store - br $folding-inner0 - end - end - local.get $3 - local.get $0 - local.get $2 - call $~lib/rt/tlsf/moveBlock - local.set $0 - br $__inlined_func$~lib/rt/tlsf/reallocateBlock - end - local.get $3 - local.get $0 - local.get $5 - call $~lib/rt/tlsf/prepareBlock - end - end - local.get $0 - i32.const 4 - i32.add - local.tee $0 - i32.const 4 - i32.sub - local.get $1 - i32.store offset=16 - local.get $0 - i32.const 16 - i32.add - ) - (func $~lib/typedarray/Int8Array#filter (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3808 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=8 - local.set $0 - i32.const 12 - i32.const 3 - call $~lib/rt/pure/__new - local.set $3 - local.get $0 - i32.const 0 - call $~lib/rt/pure/__new - local.set $6 - local.get $2 - i32.load offset=4 - local.set $8 - loop $for-loop|0 - local.get $4 - local.get $0 - i32.lt_s - if - local.get $4 - local.get $8 - i32.add - i32.load8_s - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $7 - local.get $4 - local.get $2 local.get $5 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 local.get $6 + local.get $1 + i32.const 1 + i32.shl i32.add local.get $7 - i32.store8 + i32.store16 local.get $1 i32.const 1 i32.add local.set $1 end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|0 end end - local.get $3 + local.get $4 local.get $6 local.get $1 - call $~lib/rt/pure/__renew + i32.const 1 + i32.shl local.tee $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $4 local.get $0 + i32.store offset=8 + local.get $4 + local.get $2 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release - i32.const 3808 + i32.const 3904 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Int8Array#constructor + call $~lib/typedarray/Int16Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 i32.const 5 i32.const 5 - call $~lib/typedarray/Int8Array#__set + call $~lib/typedarray/Int16Array#__set local.get $0 - call $~lib/typedarray/Int8Array#filter + call $~lib/typedarray/Int16Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -5899,6 +5577,8 @@ end local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -5911,7 +5591,7 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 3 i32.ne if @@ -5924,7 +5604,7 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 4 i32.ne if @@ -5937,7 +5617,7 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Int8Array#__get + call $~lib/typedarray/Int16Array#__get i32.const 5 i32.ne if @@ -5955,14 +5635,14 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 + i32.const 65535 i32.and i32.const 2 i32.gt_u ) - (func $~lib/typedarray/Uint8Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -5973,112 +5653,123 @@ (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $2 - i32.const 3840 + local.set $3 + i32.const 3936 call $~lib/rt/pure/__retain local.set $5 - local.get $2 + local.get $3 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $0 i32.const 12 - i32.const 4 + i32.const 7 call $~lib/rt/pure/__new - local.set $3 + local.set $4 local.get $0 + i32.const 1 + i32.shl i32.const 0 call $~lib/rt/pure/__new local.set $6 - local.get $2 + local.get $3 i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if - local.get $4 local.get $8 + local.get $2 + i32.const 1 + i32.shl i32.add - i32.load8_u + i32.load16_u local.set $7 i32.const 3 global.set $~argumentsLength local.get $7 - local.get $4 local.get $2 + local.get $3 local.get $5 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 local.get $6 + local.get $1 + i32.const 1 + i32.shl i32.add local.get $7 - i32.store8 + i32.store16 local.get $1 i32.const 1 i32.add local.set $1 end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|0 end end - local.get $3 + local.get $4 local.get $6 local.get $1 - call $~lib/rt/pure/__renew + i32.const 1 + i32.shl local.tee $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $4 local.get $0 + i32.store offset=8 + local.get $4 + local.get $2 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release - i32.const 3840 + i32.const 3936 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Uint8Array#constructor + call $~lib/typedarray/Uint16Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 i32.const 5 i32.const 5 - call $~lib/typedarray/Uint8Array#__set + call $~lib/typedarray/Uint16Array#__set local.get $0 - call $~lib/typedarray/Uint8Array#filter + call $~lib/typedarray/Uint16Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -6094,6 +5785,8 @@ end local.get $1 i32.load offset=8 + i32.const 1 + i32.shr_u i32.const 3 i32.ne if @@ -6106,7 +5799,7 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 3 i32.ne if @@ -6119,7 +5812,7 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 4 i32.ne if @@ -6132,7 +5825,7 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint8Array#__get + call $~lib/typedarray/Uint16Array#__get i32.const 5 i32.ne if @@ -6150,7 +5843,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#filter (param $0 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i32.const 2 + i32.gt_s + ) + (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6161,112 +5859,123 @@ (local $8 i32) local.get $0 call $~lib/rt/pure/__retain - local.set $2 - i32.const 3872 + local.set $3 + i32.const 3968 call $~lib/rt/pure/__retain local.set $5 - local.get $2 + local.get $3 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $0 i32.const 12 - i32.const 5 + i32.const 8 call $~lib/rt/pure/__new - local.set $3 + local.set $4 local.get $0 + i32.const 2 + i32.shl i32.const 0 call $~lib/rt/pure/__new local.set $6 - local.get $2 + local.get $3 i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $4 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if - local.get $4 local.get $8 + local.get $2 + i32.const 2 + i32.shl i32.add - i32.load8_u + i32.load local.set $7 i32.const 3 global.set $~argumentsLength local.get $7 - local.get $4 local.get $2 + local.get $3 local.get $5 i32.load call_indirect (type $i32_i32_i32_=>_i32) if - local.get $1 local.get $6 - i32.add - local.get $7 - i32.store8 + local.get $1 + i32.const 2 + i32.shl + i32.add + local.get $7 + i32.store local.get $1 i32.const 1 i32.add local.set $1 end - local.get $4 + local.get $2 i32.const 1 i32.add - local.set $4 + local.set $2 br $for-loop|0 end end - local.get $3 + local.get $4 local.get $6 local.get $1 - call $~lib/rt/pure/__renew + i32.const 2 + i32.shl local.tee $0 + call $~lib/rt/pure/__renew + local.tee $2 call $~lib/rt/pure/__retain i32.store - local.get $3 - local.get $1 - i32.store offset=8 - local.get $3 + local.get $4 local.get $0 + i32.store offset=8 + local.get $4 + local.get $2 i32.store offset=4 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.get $5 call $~lib/rt/pure/__release - local.get $2 + local.get $3 call $~lib/rt/pure/__release - i32.const 3872 + i32.const 3968 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#constructor + call $~lib/typedarray/Int32Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 i32.const 5 i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set + call $~lib/typedarray/Int32Array#__set local.get $0 - call $~lib/typedarray/Uint8ClampedArray#filter + call $~lib/typedarray/Int32Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -6282,6 +5991,8 @@ end local.get $1 i32.load offset=8 + i32.const 2 + i32.shr_u i32.const 3 i32.ne if @@ -6294,7 +6005,7 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 3 i32.ne if @@ -6307,7 +6018,7 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 4 i32.ne if @@ -6320,7 +6031,7 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get + call $~lib/typedarray/Int32Array#__get i32.const 5 i32.ne if @@ -6338,16 +6049,12 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s i32.const 2 - i32.gt_s + i32.gt_u ) - (func $~lib/typedarray/Int16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) @@ -6359,20 +6066,20 @@ local.get $0 call $~lib/rt/pure/__retain local.set $3 - i32.const 3904 + i32.const 4000 call $~lib/rt/pure/__retain local.set $5 local.get $3 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $0 i32.const 12 - i32.const 6 + i32.const 9 call $~lib/rt/pure/__new local.set $4 local.get $0 - i32.const 1 + i32.const 2 i32.shl i32.const 0 call $~lib/rt/pure/__new @@ -6381,16 +6088,16 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_s + i32.load local.set $7 i32.const 3 global.set $~argumentsLength @@ -6403,11 +6110,11 @@ if local.get $6 local.get $1 - i32.const 1 + i32.const 2 i32.shl i32.add local.get $7 - i32.store16 + i32.store local.get $1 i32.const 1 i32.add @@ -6423,7 +6130,7 @@ local.get $4 local.get $6 local.get $1 - i32.const 1 + i32.const 2 i32.shl local.tee $0 call $~lib/rt/pure/__renew @@ -6442,39 +6149,39 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 3904 + i32.const 4000 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Int16Array#constructor + call $~lib/typedarray/Uint32Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 i32.const 1 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 1 i32.const 2 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 2 i32.const 3 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 3 i32.const 4 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 i32.const 5 i32.const 5 - call $~lib/typedarray/Int16Array#__set + call $~lib/typedarray/Uint32Array#__set local.get $0 - call $~lib/typedarray/Int16Array#filter + call $~lib/typedarray/Uint32Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -6490,7 +6197,7 @@ end local.get $1 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u i32.const 3 i32.ne @@ -6504,7 +6211,7 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 3 i32.ne if @@ -6517,7 +6224,7 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 4 i32.ne if @@ -6530,7 +6237,7 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Int16Array#__get + call $~lib/typedarray/Uint32Array#__get i32.const 5 i32.ne if @@ -6548,39 +6255,37 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 2 - i32.gt_u + i64.const 2 + i64.gt_s ) - (func $~lib/typedarray/Uint16Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 i64) (local $8 i32) local.get $0 call $~lib/rt/pure/__retain local.set $3 - i32.const 3936 + i32.const 4032 call $~lib/rt/pure/__retain local.set $5 local.get $3 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $0 i32.const 12 - i32.const 7 + i32.const 10 call $~lib/rt/pure/__new local.set $4 local.get $0 - i32.const 1 + i32.const 3 i32.shl i32.const 0 call $~lib/rt/pure/__new @@ -6589,16 +6294,16 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_u + i64.load local.set $7 i32.const 3 global.set $~argumentsLength @@ -6607,15 +6312,15 @@ local.get $3 local.get $5 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $i64_i32_i32_=>_i32) if local.get $6 local.get $1 - i32.const 1 + i32.const 3 i32.shl i32.add local.get $7 - i32.store16 + i64.store local.get $1 i32.const 1 i32.add @@ -6631,7 +6336,7 @@ local.get $4 local.get $6 local.get $1 - i32.const 1 + i32.const 3 i32.shl local.tee $0 call $~lib/rt/pure/__renew @@ -6650,39 +6355,39 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 3936 + i32.const 4032 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Uint16Array#constructor + call $~lib/typedarray/Int64Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set + i64.const 1 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set + i64.const 2 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set + i64.const 3 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set + i64.const 4 + call $~lib/typedarray/Int64Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set + i64.const 5 + call $~lib/typedarray/Int64Array#__set local.get $0 - call $~lib/typedarray/Uint16Array#filter + call $~lib/typedarray/Int64Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -6698,7 +6403,7 @@ end local.get $1 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u i32.const 3 i32.ne @@ -6712,9 +6417,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 1360 @@ -6725,9 +6430,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1360 @@ -6738,9 +6443,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1360 @@ -6756,37 +6461,37 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.gt_s + i64.const 2 + i64.gt_u ) - (func $~lib/typedarray/Int32Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 i64) (local $8 i32) local.get $0 call $~lib/rt/pure/__retain local.set $3 - i32.const 3968 + i32.const 4064 call $~lib/rt/pure/__retain local.set $5 local.get $3 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $0 i32.const 12 - i32.const 8 + i32.const 11 call $~lib/rt/pure/__new local.set $4 local.get $0 - i32.const 2 + i32.const 3 i32.shl i32.const 0 call $~lib/rt/pure/__new @@ -6795,16 +6500,16 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load + i64.load local.set $7 i32.const 3 global.set $~argumentsLength @@ -6813,15 +6518,15 @@ local.get $3 local.get $5 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $i64_i32_i32_=>_i32) if local.get $6 local.get $1 - i32.const 2 + i32.const 3 i32.shl i32.add local.get $7 - i32.store + i64.store local.get $1 i32.const 1 i32.add @@ -6837,7 +6542,7 @@ local.get $4 local.get $6 local.get $1 - i32.const 2 + i32.const 3 i32.shl local.tee $0 call $~lib/rt/pure/__renew @@ -6856,39 +6561,39 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 3968 + i32.const 4064 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Int32Array#constructor + call $~lib/typedarray/Uint64Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set + i64.const 1 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set + i64.const 2 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set + i64.const 3 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set + i64.const 4 + call $~lib/typedarray/Uint64Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Int32Array#__set + i64.const 5 + call $~lib/typedarray/Uint64Array#__set local.get $0 - call $~lib/typedarray/Int32Array#filter + call $~lib/typedarray/Uint64Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -6904,7 +6609,7 @@ end local.get $1 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u i32.const 3 i32.ne @@ -6918,9 +6623,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 3 + i64.ne if i32.const 0 i32.const 1360 @@ -6931,9 +6636,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne if i32.const 0 i32.const 1360 @@ -6944,9 +6649,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Uint64Array#__get + i64.const 5 + i64.ne if i32.const 0 i32.const 1360 @@ -6962,24 +6667,24 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.gt_u + f32.const 2 + f32.gt ) - (func $~lib/typedarray/Uint32Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i32) + (local $7 f32) (local $8 i32) local.get $0 call $~lib/rt/pure/__retain local.set $3 - i32.const 4000 + i32.const 4096 call $~lib/rt/pure/__retain local.set $5 local.get $3 @@ -6988,7 +6693,7 @@ i32.shr_u local.set $0 i32.const 12 - i32.const 9 + i32.const 12 call $~lib/rt/pure/__new local.set $4 local.get $0 @@ -7001,16 +6706,16 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 i32.const 2 i32.shl i32.add - i32.load + f32.load local.set $7 i32.const 3 global.set $~argumentsLength @@ -7019,7 +6724,7 @@ local.get $3 local.get $5 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $f32_i32_i32_=>_i32) if local.get $6 local.get $1 @@ -7027,7 +6732,7 @@ i32.shl i32.add local.get $7 - i32.store + f32.store local.get $1 i32.const 1 i32.add @@ -7062,39 +6767,39 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 4000 + i32.const 4096 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Uint32Array#constructor + call $~lib/typedarray/Float32Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set + f32.const 1 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set + f32.const 2 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set + f32.const 3 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set + f32.const 4 + call $~lib/typedarray/Float32Array#__set local.get $0 i32.const 5 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set + f32.const 5 + call $~lib/typedarray/Float32Array#__set local.get $0 - call $~lib/typedarray/Uint32Array#filter + call $~lib/typedarray/Float32Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -7124,9 +6829,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 3 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 3 + f32.ne if i32.const 0 i32.const 1360 @@ -7137,9 +6842,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne if i32.const 0 i32.const 1360 @@ -7150,9 +6855,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 5 - i32.ne + call $~lib/typedarray/Float32Array#__get + f32.const 5 + f32.ne if i32.const 0 i32.const 1360 @@ -7168,24 +6873,24 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.gt_s + f64.const 2 + f64.gt ) - (func $~lib/typedarray/Int64Array#filter (param $0 i32) (result i32) + (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) (local $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i64) + (local $7 f64) (local $8 i32) local.get $0 call $~lib/rt/pure/__retain local.set $3 - i32.const 4032 + i32.const 4128 call $~lib/rt/pure/__retain local.set $5 local.get $3 @@ -7194,7 +6899,7 @@ i32.shr_u local.set $0 i32.const 12 - i32.const 10 + i32.const 13 call $~lib/rt/pure/__new local.set $4 local.get $0 @@ -7207,16 +6912,16 @@ i32.load offset=4 local.set $8 loop $for-loop|0 - local.get $2 local.get $0 - i32.lt_s + local.get $2 + i32.gt_s if local.get $8 local.get $2 i32.const 3 i32.shl i32.add - i64.load + f64.load local.set $7 i32.const 3 global.set $~argumentsLength @@ -7225,7 +6930,7 @@ local.get $3 local.get $5 i32.load - call_indirect (type $i64_i32_i32_=>_i32) + call_indirect (type $f64_i32_i32_=>_i32) if local.get $6 local.get $1 @@ -7233,7 +6938,7 @@ i32.shl i32.add local.get $7 - i64.store + f64.store local.get $1 i32.const 1 i32.add @@ -7268,39 +6973,39 @@ call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 4032 + i32.const 4128 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> (local $0 i32) (local $1 i32) (local $2 i32) i32.const 6 - call $~lib/typedarray/Int64Array#constructor + call $~lib/typedarray/Float64Array#constructor local.tee $2 call $~lib/rt/pure/__retain local.tee $0 i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set + f64.const 1 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set + f64.const 2 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set + f64.const 3 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set + f64.const 4 + call $~lib/typedarray/Float64Array#__set local.get $0 i32.const 5 - i64.const 5 - call $~lib/typedarray/Int64Array#__set + f64.const 5 + call $~lib/typedarray/Float64Array#__set local.get $0 - call $~lib/typedarray/Int64Array#filter + call $~lib/typedarray/Float64Array#filter local.tee $1 i32.load offset=4 local.get $1 @@ -7330,9 +7035,9 @@ end local.get $1 i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 3 - i64.ne + call $~lib/typedarray/Float64Array#__get + f64.const 3 + f64.ne if i32.const 0 i32.const 1360 @@ -7343,9 +7048,9 @@ end local.get $1 i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne if i32.const 0 i32.const 1360 @@ -7356,9 +7061,9 @@ end local.get $1 i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne + call $~lib/typedarray/Float64Array#__get + f64.const 5 + f64.ne if i32.const 0 i32.const 1360 @@ -7374,632 +7079,223 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.gt_u + i32.const 255 + i32.and + i32.const 2 + i32.eq ) - (func $~lib/typedarray/Uint64Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 i64) - (local $8 i32) - local.get $0 + local.get $1 call $~lib/rt/pure/__retain local.set $3 - i32.const 4064 - call $~lib/rt/pure/__retain - local.set $5 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - i32.const 12 - i32.const 11 - call $~lib/rt/pure/__new - local.set $4 - local.get $0 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/pure/__new - local.set $6 - local.get $3 - i32.load offset=4 - local.set $8 - loop $for-loop|0 - local.get $2 + block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) local.get $0 - i32.lt_s - if - local.get $8 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $7 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.set $5 + loop $for-loop|0 local.get $2 - local.get $3 local.get $5 - i32.load - call_indirect (type $i64_i32_i32_=>_i32) + i32.lt_s if - local.get $6 - local.get $1 - i32.const 3 - i32.shl + local.get $2 + local.get $4 i32.add - local.get $7 - i64.store + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 local.get $1 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + end + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 end - local.get $4 - local.get $6 - local.get $1 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/pure/__renew - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.store offset=8 - local.get $4 - local.get $2 - i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 4064 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Uint64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 5 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set + (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - call $~lib/typedarray/Uint64Array#filter - local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub - if - i32.const 0 - i32.const 1360 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 3 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end + i32.const 255 + i32.and + i32.eqz + ) + (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + (local $6 i32) local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 5 - i64.ne - if + call $~lib/rt/pure/__retain + local.set $3 + block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.set $5 + loop $for-loop|0 + local.get $2 + local.get $5 + i32.lt_s + if + local.get $2 + local.get $4 + i32.add + i32.load8_u + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 + local.get $1 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + end + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|0 + end + end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release i32.const 0 - i32.const 1360 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 + local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - f32.const 2 - f32.gt + i32.const 65535 + i32.and + i32.const 2 + i32.eq ) - (func $~lib/typedarray/Float32Array#filter (param $0 i32) (result i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - (local $7 f32) - (local $8 i32) - local.get $0 + local.get $1 call $~lib/rt/pure/__retain local.set $3 - i32.const 4096 - call $~lib/rt/pure/__retain - local.set $5 - local.get $3 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $0 - i32.const 12 - i32.const 12 - call $~lib/rt/pure/__new - local.set $4 - local.get $0 - i32.const 2 - i32.shl - i32.const 0 - call $~lib/rt/pure/__new - local.set $6 - local.get $3 - i32.load offset=4 - local.set $8 - loop $for-loop|0 - local.get $2 + block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) local.get $0 - i32.lt_s - if - local.get $8 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $7 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $5 + loop $for-loop|0 local.get $2 - local.get $3 local.get $5 - i32.load - call_indirect (type $f32_i32_i32_=>_i32) + i32.lt_s if - local.get $6 - local.get $1 - i32.const 2 + local.get $4 + local.get $2 + i32.const 1 i32.shl i32.add - local.get $7 - f32.store + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $2 + local.get $0 local.get $1 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + if + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + end + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 end - local.get $4 - local.get $6 - local.get $1 - i32.const 2 - i32.shl - local.tee $0 - call $~lib/rt/pure/__renew - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.store offset=8 - local.get $4 - local.get $2 - i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 4096 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Float32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 5 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#filter - local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub - if - i32.const 0 - i32.const 1360 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 3 - f32.ne - if - i32.const 0 - i32.const 1360 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - if - i32.const 0 - i32.const 1360 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 5 - f32.ne - if - i32.const 0 - i32.const 1360 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f64.const 2 - f64.gt - ) - (func $~lib/typedarray/Float64Array#filter (param $0 i32) (result i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 f64) - (local $8 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $3 - i32.const 4128 - call $~lib/rt/pure/__retain - local.set $5 - local.get $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $0 - i32.const 12 - i32.const 13 - call $~lib/rt/pure/__new - local.set $4 - local.get $0 - i32.const 3 - i32.shl - i32.const 0 - call $~lib/rt/pure/__new - local.set $6 - local.get $3 - i32.load offset=4 - local.set $8 - loop $for-loop|0 - local.get $2 - local.get $0 - i32.lt_s - if - local.get $8 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $7 - i32.const 3 - global.set $~argumentsLength - local.get $7 - local.get $2 - local.get $3 - local.get $5 - i32.load - call_indirect (type $f64_i32_i32_=>_i32) - if - local.get $6 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $7 - f64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $4 - local.get $6 - local.get $1 - i32.const 3 - i32.shl - local.tee $0 - call $~lib/rt/pure/__renew - local.tee $2 - call $~lib/rt/pure/__retain - i32.store - local.get $4 - local.get $0 - i32.store offset=8 - local.get $4 - local.get $2 - i32.store offset=4 - local.get $4 - call $~lib/rt/pure/__retain - local.get $5 - call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release - i32.const 4128 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - i32.const 6 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#filter - local.tee $1 - i32.load offset=4 - local.get $1 - i32.load - i32.sub - if - i32.const 0 - i32.const 1360 - i32.const 390 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 3 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 391 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 3 - f64.ne - if - i32.const 0 - i32.const 1360 - i32.const 392 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - if - i32.const 0 - i32.const 1360 - i32.const 393 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 5 - f64.ne - if - i32.const 0 - i32.const 1360 - i32.const 394 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 + i32.const 65535 i32.and - i32.const 2 - i32.eq + i32.eqz ) - (func $~lib/typedarray/Int8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8008,7 +7304,7 @@ local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -8020,16 +7316,20 @@ local.set $4 local.get $0 i32.load offset=8 + i32.const 1 + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 local.get $5 i32.lt_s if - local.get $2 local.get $4 + local.get $2 + i32.const 1 + i32.shl i32.add - i32.load8_s + i32.load16_u i32.const 3 global.set $~argumentsLength local.get $2 @@ -8043,7 +7343,7 @@ local.get $0 call $~lib/rt/pure/__release i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Int8Array,i8>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 end local.get $2 i32.const 1 @@ -8061,13 +7361,12 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 255 - i32.and - i32.eqz + i32.const 2 + i32.eq ) - (func $~lib/typedarray/Uint8Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -8076,7 +7375,7 @@ local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -8088,16 +7387,20 @@ local.set $4 local.get $0 i32.load offset=8 + i32.const 2 + i32.shr_u local.set $5 loop $for-loop|0 local.get $2 local.get $5 i32.lt_s if - local.get $2 local.get $4 + local.get $2 + i32.const 2 + i32.shl i32.add - i32.load8_u + i32.load i32.const 3 global.set $~argumentsLength local.get $2 @@ -8111,7 +7414,7 @@ local.get $0 call $~lib/rt/pure/__release i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Uint8Array,u8>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 end local.get $2 i32.const 1 @@ -8129,23 +7432,25 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.const 2 - i32.eq + i32.eqz ) - (func $~lib/typedarray/Int16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + i64.const 2 + i64.eq + ) + (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 i64) local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -8157,7 +7462,7 @@ local.set $4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 3 i32.shr_u local.set $5 loop $for-loop|0 @@ -8167,24 +7472,24 @@ if local.get $4 local.get $2 - i32.const 1 + i32.const 3 i32.shl i32.add - i32.load16_s + i64.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $i64_i32_i32_=>_i32) if local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Int16Array,i16>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 end local.get $2 i32.const 1 @@ -8202,22 +7507,25 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int16Array,i16>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 65535 - i32.and - i32.eqz + i64.eqz ) - (func $~lib/typedarray/Uint16Array#some (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f32.const 2 + f32.eq + ) + (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f32) local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -8229,7 +7537,7 @@ local.set $4 local.get $0 i32.load offset=8 - i32.const 1 + i32.const 2 i32.shr_u local.set $5 loop $for-loop|0 @@ -8239,24 +7547,24 @@ if local.get $4 local.get $2 - i32.const 1 + i32.const 2 i32.shl i32.add - i32.load16_u + f32.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $f32_i32_i32_=>_i32) if local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Uint16Array,u16>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 end local.get $2 i32.const 1 @@ -8274,21 +7582,26 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i32.const 2 - i32.eq + f32.const 0 + f32.eq ) - (func $~lib/typedarray/Int32Array#some (param $0 i32) (param $1 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) + local.get $0 + f64.const 2 + f64.eq + ) + (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i32) + (local $6 f64) local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 (result i32) + block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) local.get $0 call $~lib/rt/pure/__retain local.set $0 @@ -8300,7 +7613,7 @@ local.set $4 local.get $0 i32.load offset=8 - i32.const 2 + i32.const 3 i32.shr_u local.set $5 loop $for-loop|0 @@ -8310,24 +7623,24 @@ if local.get $4 local.get $2 - i32.const 2 + i32.const 3 i32.shl i32.add - i32.load + f64.load i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 i32.load - call_indirect (type $i32_i32_i32_=>_i32) + call_indirect (type $f64_i32_i32_=>_i32) if local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Int32Array,i32>|inlined.0 + br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 end local.get $2 i32.const 1 @@ -8345,64 +7658,55 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int32Array,i32>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i32.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) local.get $0 - i64.const 2 - i64.eq + f64.const 0 + f64.eq ) - (func $~lib/typedarray/Int64Array#some (param $0 i32) (param $1 i32) (result i32) + (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) (local $4 i32) (local $5 i32) - (local $6 i64) + (local $6 i32) local.get $1 call $~lib/rt/pure/__retain local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $5 + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + local.get $0 + i32.load offset=4 + local.set $4 + local.get $0 + i32.load offset=8 + local.set $5 + block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 loop $for-loop|0 local.get $2 local.get $5 i32.lt_s if - local.get $4 local.get $2 - i32.const 3 - i32.shl + local.get $4 i32.add - i64.load + i32.load8_s i32.const 3 global.set $~argumentsLength local.get $2 local.get $0 local.get $1 i32.load - call_indirect (type $i64_i32_i32_=>_i32) + call_indirect (type $i32_i32_i32_=>_i32) if local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Int64Array,i64>|inlined.0 + br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 end local.get $2 i32.const 1 @@ -8415,231 +7719,14 @@ call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 0 + i32.const -1 + local.set $2 end local.get $3 call $~lib/rt/pure/__release + local.get $2 ) - (func $std/typedarray/testArraySome<~lib/typedarray/Int64Array,i64>~anonymous|1 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.eqz - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|0 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 2 - f32.eq - ) - (func $~lib/typedarray/Float32Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $5 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect (type $f32_i32_i32_=>_i32) - if - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - end - local.get $3 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float32Array,f32>~anonymous|1 (param $0 f32) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f32.const 0 - f32.eq - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|0 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f64.const 2 - f64.eq - ) - (func $~lib/typedarray/Float64Array#some (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 f64) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - block $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $5 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect (type $f64_i32_i32_=>_i32) - if - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/SOME<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - end - local.get $3 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArraySome<~lib/typedarray/Float64Array,f64>~anonymous|1 (param $0 f64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - f64.const 0 - f64.eq - ) - (func $~lib/typedarray/Int8Array#findIndex (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=4 - local.set $4 - local.get $0 - i32.load offset=8 - local.set $5 - block $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - loop $for-loop|0 - local.get $2 - local.get $5 - i32.lt_s - if - local.get $2 - local.get $4 - i32.add - i32.load8_s - i32.const 3 - global.set $~argumentsLength - local.get $2 - local.get $0 - local.get $1 - i32.load - call_indirect (type $i32_i32_i32_=>_i32) - if - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - br $~lib/typedarray/FIND_INDEX<~lib/typedarray/Int8Array,i8>|inlined.0 - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const -1 - local.set $2 - end - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - ) - (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $std/typedarray/testArrayFindIndex<~lib/typedarray/Int8Array,i8>~anonymous|1 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) local.get $0 i32.const 255 i32.and @@ -9139,9 +8226,6 @@ f64.eq ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int8Array,i8>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i32.const 24 i32.shl @@ -9284,9 +8368,6 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int16Array,i16>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i32.const 16 i32.shl @@ -9430,15 +8511,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Int32Array,i32>~anonymous|0 (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release - local.get $0 - i32.const 1 - i32.and - i32.eqz - ) (func $~lib/typedarray/Int32Array#every (param $0 i32) (param $1 i32) (result i32) (local $2 i32) (local $3 i32) @@ -9507,9 +8579,6 @@ call $~lib/rt/pure/__release ) (func $std/typedarray/testArrayEvery<~lib/typedarray/Int64Array,i64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $2 - call $~lib/rt/pure/__retain - call $~lib/rt/pure/__release local.get $0 i64.const 1 i64.and @@ -9582,12 +8651,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $std/typedarray/testArrayEvery<~lib/typedarray/Uint64Array,u64>~anonymous|0 (param $0 i64) (param $1 i32) (param $2 i32) (result i32) - local.get $0 - i64.const 1 - i64.and - i64.eqz - ) (func $~lib/math/NativeMathf.mod (param $0 f32) (result f32) (local $1 i32) (local $2 i32) @@ -10502,9 +9565,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $1 local.get $4 @@ -10716,9 +9779,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $1 local.get $4 @@ -10758,9 +9821,9 @@ local.tee $3 i32.load offset=8 local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -10779,9 +9842,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -10980,9 +10043,9 @@ local.tee $3 i32.load offset=8 local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11001,9 +10064,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11212,9 +10275,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11260,9 +10323,9 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11281,9 +10344,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11502,9 +10565,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11550,9 +10613,9 @@ i32.const 1 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -11571,9 +10634,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -11786,9 +10849,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -11986,9 +11049,9 @@ i32.const 2 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12007,9 +11070,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -12216,9 +11279,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -12264,9 +11327,9 @@ i32.const 3 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12284,240 +11347,240 @@ select else local.get $1 + local.get $0 + local.get $0 + local.get $1 + i32.gt_s + select + end + local.set $0 + i32.const 12 + i32.const 10 + call $~lib/rt/pure/__new + local.tee $1 + local.get $3 + i32.load + call $~lib/rt/pure/__retain + i32.store + local.get $1 + local.get $3 + i32.load offset=4 + local.get $2 + i32.const 3 + i32.shl + i32.add + i32.store offset=4 + local.get $1 + local.get $0 + local.get $2 + local.get $0 + local.get $2 + i32.gt_s + select + local.get $2 + i32.sub + i32.const 3 + i32.shl + i32.store offset=8 + local.get $1 + call $~lib/rt/pure/__retain + local.get $3 + call $~lib/rt/pure/__release + ) + (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + (local $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + i32.const 6780 + i32.load + local.tee $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $4 + call $~lib/rt/pure/__retain + local.set $2 + local.get $1 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.set $3 + loop $for-loop|0 local.get $0 local.get $1 + i32.lt_s + if + local.get $2 + local.get $0 + i32.const 6768 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $3 + local.get $0 + i32.const 6768 + local.get $0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/typedarray/Int64Array#reverse + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + loop $for-loop|1 local.get $0 + local.get $1 i32.lt_s + if + local.get $2 + local.get $0 + call $~lib/typedarray/Int64Array#__get + i32.const 6768 + local.get $1 + i32.const 1 + i32.sub + local.get $0 + i32.sub + call $~lib/array/Array#__get + i64.extend_i32_s + i64.ne + if + i32.const 0 + i32.const 1360 + i32.const 524 + i32.const 5 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|1 + end + end + local.get $3 + i32.const 8 + call $~lib/typedarray/Int64Array#subarray + local.tee $1 + call $~lib/typedarray/Int64Array#reverse + local.tee $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 8 + i64.ne + if + i32.const 0 + i32.const 1360 + i32.const 529 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 7 + i64.ne + if + i32.const 0 + i32.const 1360 + i32.const 530 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 6 + i64.ne + if + i32.const 0 + i32.const 1360 + i32.const 531 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $0 + i32.const 3 + call $~lib/typedarray/Int64Array#__get + i64.const 5 + i64.ne + if + i32.const 0 + i32.const 1360 + i32.const 532 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $4 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 6768 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) + (local $3 i32) + i32.const 4 + local.get $0 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $0 + local.get $0 + i32.const 4 + i32.gt_s + select + local.set $2 + local.get $1 + i32.const 0 + i32.lt_s + if (result i32) + local.get $0 + local.get $1 + i32.add + local.tee $0 + i32.const 0 + local.get $0 + i32.const 0 + i32.gt_s + select + else + local.get $1 + local.get $0 + local.get $0 + local.get $1 + i32.gt_s select end local.set $0 i32.const 12 - i32.const 10 - call $~lib/rt/pure/__new - local.tee $1 - local.get $3 - i32.load - call $~lib/rt/pure/__retain - i32.store - local.get $1 - local.get $3 - i32.load offset=4 - local.get $2 - i32.const 3 - i32.shl - i32.add - i32.store offset=4 - local.get $1 - local.get $0 - local.get $2 - local.get $0 - local.get $2 - i32.gt_s - select - local.get $2 - i32.sub - i32.const 3 - i32.shl - i32.store offset=8 - local.get $1 - call $~lib/rt/pure/__retain - local.get $3 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - i32.const 6780 - i32.load - local.tee $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $4 - call $~lib/rt/pure/__retain - local.set $2 - local.get $1 - call $~lib/typedarray/Int64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.set $3 - loop $for-loop|0 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - i32.const 6768 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $3 - local.get $0 - i32.const 6768 - local.get $0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|0 - end - end - local.get $2 - call $~lib/typedarray/Int64Array#reverse - call $~lib/rt/pure/__release - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - local.get $1 - i32.lt_s - if - local.get $2 - local.get $0 - call $~lib/typedarray/Int64Array#__get - i32.const 6768 - local.get $1 - i32.const 1 - i32.sub - local.get $0 - i32.sub - call $~lib/array/Array#__get - i64.extend_i32_s - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 524 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $3 - i32.const 8 - call $~lib/typedarray/Int64Array#subarray - local.tee $1 - call $~lib/typedarray/Int64Array#reverse - local.tee $0 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 8 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 529 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 7 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 530 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 6 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 531 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.const 3 - call $~lib/typedarray/Int64Array#__get - i64.const 5 - i64.ne - if - i32.const 0 - i32.const 1360 - i32.const 532 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $4 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 6768 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#subarray (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - (local $3 i32) - i32.const 4 - local.get $0 - call $~lib/rt/pure/__retain - local.tee $3 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $0 - i32.const 4 - local.get $0 - i32.lt_s - select - local.set $2 - local.get $1 - i32.const 0 - i32.lt_s - if (result i32) - local.get $0 - local.get $1 - i32.add - local.tee $0 - i32.const 0 - local.get $0 - i32.const 0 - i32.gt_s - select - else - local.get $1 - local.get $0 - local.get $1 - local.get $0 - i32.lt_s - select - end - local.set $0 - i32.const 12 - i32.const 11 + i32.const 11 call $~lib/rt/pure/__new local.tee $1 local.get $3 @@ -12722,9 +11785,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -12770,9 +11833,9 @@ i32.const 2 i32.shr_u local.tee $0 - i32.const 4 local.get $0 - i32.lt_s + i32.const 4 + i32.gt_s select local.set $2 local.get $1 @@ -12791,9 +11854,9 @@ else local.get $1 local.get $0 - local.get $1 local.get $0 - i32.lt_s + local.get $1 + i32.gt_s select end local.set $0 @@ -13003,9 +12066,9 @@ i32.sub local.set $0 loop $for-loop|0 - local.get $1 local.get $0 - i32.lt_u + local.get $1 + i32.gt_u if local.get $4 local.get $1 @@ -18867,16 +17930,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -18885,11 +17939,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -18903,19 +17962,18 @@ i32.const 7152 return end + i32.const 0 + local.get $0 + i32.sub + local.get $0 local.get $0 i32.const 31 i32.shr_u + local.tee $0 + select local.tee $1 - if - i32.const 0 - local.get $0 - i32.sub - local.set $0 - end - local.get $0 call $~lib/util/number/decimalCount32 - local.get $1 + local.get $0 i32.add local.tee $3 i32.const 1 @@ -18923,10 +17981,10 @@ i32.const 1 call $~lib/rt/pure/__new local.tee $2 - local.get $0 + local.get $1 local.get $3 call $~lib/util/number/utoa_dec_simple - local.get $1 + local.get $0 if local.get $2 i32.const 45 @@ -19008,9 +18066,9 @@ i32.const 1 i32.shr_u local.tee $2 - i32.const 0 local.get $2 - i32.lt_s + i32.const 0 + i32.gt_s select local.tee $3 local.get $1 @@ -19026,18 +18084,18 @@ i32.lt_s select local.tee $1 - local.get $3 local.get $1 - i32.gt_s + local.get $3 + i32.lt_s select i32.const 1 i32.shl local.tee $4 local.get $3 local.get $1 - local.get $3 local.get $1 - i32.lt_s + local.get $3 + i32.gt_s select i32.const 1 i32.shl @@ -19127,9 +18185,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19460,9 +18518,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19653,9 +18711,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -19821,9 +18879,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20002,9 +19060,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20161,9 +19219,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -20293,17 +19351,7 @@ select ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i64) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i64.const 10 - i64.rem_u - i32.wrap_i64 - local.set $3 - local.get $1 - i64.const 10 - i64.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -20312,11 +19360,17 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i64.const 10 + i64.rem_u + i32.wrap_i64 i32.const 48 i32.add i32.store16 local.get $1 + i64.const 10 + i64.div_u + local.tee $1 i64.const 0 i64.ne br_if $do-continue|0 @@ -20419,18 +19473,17 @@ i64.eqz br_if $__inlined_func$~lib/util/number/itoa64 drop + i64.const 0 + local.get $3 + i64.sub + local.get $3 local.get $3 i64.const 63 i64.shr_u i32.wrap_i64 local.tee $0 - if - i64.const 0 - local.get $3 - i64.sub - local.set $3 - end - local.get $3 + select + local.tee $3 i64.const 4294967295 i64.le_u if @@ -20498,9 +19551,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $5 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -20713,9 +19766,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $7 local.get $4 - i32.lt_s + local.get $7 + i32.gt_s if local.get $1 local.get $2 @@ -20977,6 +20030,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -20985,8 +20039,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -21029,11 +20082,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -21154,11 +20207,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -21277,9 +20330,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -21877,9 +20930,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -22017,9 +21070,9 @@ call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 - local.get $6 local.get $4 - i32.lt_s + local.get $6 + i32.gt_s if local.get $1 local.get $2 @@ -22125,20 +21178,37 @@ local.get $1 call $~lib/rt/pure/__retain ) - (func $~lib/typedarray/Uint8Array.wrap (param $0 i32) (param $1 i32) (param $2 i32) (result i32) + (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) + (local $2 i32) (local $3 i32) (local $4 i32) - (local $5 i32) + block $2of2 + block $1of2 + block $0of2 + block $outOfRange + global.get $~argumentsLength + i32.const 1 + i32.sub + br_table $0of2 $1of2 $2of2 $outOfRange + end + unreachable + end + i32.const 0 + local.set $1 + end + i32.const -1 + local.set $3 + end local.get $1 local.get $0 call $~lib/rt/pure/__retain - local.tee $5 + local.tee $4 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $4 + local.tee $2 i32.gt_u if i32.const 1424 @@ -22148,15 +21218,15 @@ call $~lib/builtins/abort unreachable end - local.get $2 + local.get $3 i32.const 0 i32.lt_s if - local.get $2 + local.get $3 i32.const -1 i32.eq if (result i32) - local.get $4 + local.get $2 local.get $1 i32.sub else @@ -22167,14 +21237,13 @@ call $~lib/builtins/abort unreachable end - local.set $0 + local.set $3 else local.get $2 - local.tee $0 local.get $1 + local.get $3 i32.add - local.get $4 - i32.gt_s + i32.lt_s if i32.const 1056 i32.const 1488 @@ -22188,48 +21257,24 @@ i32.const 4 call $~lib/rt/pure/__new local.tee $2 - local.get $3 + local.get $0 call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $0 + local.get $3 i32.store offset=8 local.get $2 + local.get $0 local.get $1 - local.get $3 i32.add i32.store offset=4 local.get $2 call $~lib/rt/pure/__retain - local.get $3 + local.get $0 call $~lib/rt/pure/__release - local.get $5 + local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array.wrap@varargs (param $0 i32) (param $1 i32) (result i32) - (local $2 i32) - block $2of2 - block $1of2 - block $0of2 - block $outOfRange - global.get $~argumentsLength - i32.const 1 - i32.sub - br_table $0of2 $1of2 $2of2 $outOfRange - end - unreachable - end - i32.const 0 - local.set $1 - end - i32.const -1 - local.set $2 - end - local.get $0 - local.get $1 - local.get $2 - call $~lib/typedarray/Uint8Array.wrap - ) (func $~lib/arraybuffer/ArrayBuffer#slice (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) local.get $0 @@ -22365,19 +21410,7 @@ i32.const 20 i32.sub i32.load offset=16 - local.tee $2 local.set $7 - i32.const 0 - local.get $2 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end i32.const 12 i32.const 3 call $~lib/rt/pure/__new @@ -22598,19 +21631,7 @@ i32.const 20 i32.sub i32.load offset=16 - local.tee $2 local.set $7 - i32.const 0 - local.get $2 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end i32.const 12 i32.const 5 call $~lib/rt/pure/__new @@ -22684,7 +21705,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int16Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -22728,26 +21749,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 1 i32.and if @@ -22766,7 +21778,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -22776,7 +21788,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -22807,7 +21819,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -22831,7 +21843,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint16Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -22873,26 +21885,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 1 i32.and if @@ -22911,7 +21914,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -22921,7 +21924,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -22952,7 +21955,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -22976,7 +21979,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23016,26 +22019,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23054,7 +22048,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23064,7 +22058,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23095,7 +22089,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23119,7 +22113,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23159,26 +22153,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23197,7 +22182,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23207,7 +22192,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23238,7 +22223,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23262,7 +22247,7 @@ i32.load local.tee $3 call $~lib/typedarray/Int64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23303,26 +22288,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23341,7 +22317,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23351,7 +22327,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23382,7 +22358,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23406,7 +22382,7 @@ i32.load local.tee $3 call $~lib/typedarray/Uint64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23447,26 +22423,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23485,7 +22452,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23495,7 +22462,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23526,7 +22493,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23550,7 +22517,7 @@ i32.load local.tee $3 call $~lib/typedarray/Float32Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23591,26 +22558,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 3 i32.and if @@ -23629,7 +22587,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23639,7 +22597,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23670,7 +22628,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23694,7 +22652,7 @@ i32.load local.tee $3 call $~lib/typedarray/Float64Array#constructor - local.tee $6 + local.tee $5 call $~lib/rt/pure/__retain local.set $1 loop $for-loop|0 @@ -23735,26 +22693,17 @@ local.set $4 i32.const 1 global.set $~argumentsLength - i32.const 0 local.get $4 call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $~lib/rt/pure/__retain local.tee $0 i32.const 20 i32.sub i32.load offset=16 - local.tee $5 - i32.gt_u - if - i32.const 1424 - i32.const 1488 - i32.const 1741 - i32.const 5 - call $~lib/builtins/abort - unreachable - end - local.get $5 + local.tee $2 + local.set $7 + local.get $2 i32.const 7 i32.and if @@ -23773,7 +22722,7 @@ call $~lib/rt/pure/__retain i32.store local.get $2 - local.get $5 + local.get $7 i32.store offset=8 local.get $2 local.get $0 @@ -23783,7 +22732,7 @@ local.set $2 local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release i32.const 0 local.set $0 @@ -23814,7 +22763,7 @@ br $for-loop|1 end end - local.get $6 + local.get $5 call $~lib/rt/pure/__release i32.const 8608 call $~lib/rt/pure/__release @@ -23963,84 +22912,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -24114,84 +22985,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -24350,138 +23143,278 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int8Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 0 i32.const 15 i32.const 8992 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9072 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9136 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 15 - i32.const 9168 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9072 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 2 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9136 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 15 + i32.const 9168 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -24559,162 +23492,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> (local $0 i32) (local $1 i32) @@ -24725,214 +23502,278 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9200 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/typedarray/Uint8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9280 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9312 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $0 - call $~lib/typedarray/Uint8Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9344 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int8Array#set<~lib/array/Array> - local.get $0 i32.const 10 i32.const 0 i32.const 63 - i32.const 9376 + i32.const 9200 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 call $~lib/rt/pure/__retain - local.set $0 - i32.const 8688 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 3 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $0 + local.get $7 + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $3 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $3 - i32.const 255 - local.get $3 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9280 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9312 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 2 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9344 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int8Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int8Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9376 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8688 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> (param $0 i32) (param $1 i32) (local $2 i32) @@ -25010,88 +23851,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 3 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $3 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -25118,15 +23877,15 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.load offset=8 local.get $2 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u i32.add - local.get $1 - i32.load offset=8 - i32.gt_s + i32.lt_s if i32.const 1424 i32.const 1488 @@ -25194,88 +23953,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 2 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - f64.const 0 - f64.const 255 - local.get $3 - f64.min - f64.max - i32.trunc_f64_u - else - i32.const 0 - end - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (param $2 i32) (local $3 i32) (local $4 i32) @@ -25302,15 +23979,15 @@ call $~lib/builtins/abort unreachable end + local.get $1 + i32.load offset=8 local.get $2 local.get $0 i32.load offset=8 i32.const 1 i32.shr_u i32.add - local.get $1 - i32.load offset=8 - i32.gt_s + i32.lt_s if i32.const 1424 i32.const 1488 @@ -25374,84 +24051,6 @@ local.get $4 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8944 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 7 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 7 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $1 - local.get $4 - i32.add - local.get $1 - local.get $5 - i32.add - i32.load8_s - local.tee $3 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $3 - i32.const 255 - local.get $3 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8944 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> (local $0 i32) (local $1 i32) @@ -25464,171 +24063,435 @@ (local $8 i32) (local $9 i32) (local $10 i32) + (local $11 i32) + (local $12 i32) + (local $13 i32) + (local $14 f32) + (local $15 f64) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $3 + local.tee $9 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $9 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $3 + local.get $9 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $2 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $2 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $4 + local.tee $10 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $10 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $4 + local.get $10 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $7 - call $~lib/rt/pure/__retain - local.tee $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9408 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9504 - call $~lib/rt/__newArray + local.tee $16 call $~lib/rt/pure/__retain - local.tee $9 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - local.get $3 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9536 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $10 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9568 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__retain - local.set $6 - local.get $0 + local.tee $3 call $~lib/rt/pure/__retain local.set $1 - local.get $6 - call $~lib/rt/pure/__retain - local.tee $5 - i32.load offset=8 - local.get $1 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable + block $folding-inner0 + i32.const 8688 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + local.set $11 + local.get $2 + i32.load offset=4 + local.set $5 + local.get $2 + i32.load offset=12 + local.set $6 + loop $for-loop|0 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $0 + local.get $11 + i32.add + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $7 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $7 + i32.const 255 + local.get $7 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8688 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9408 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $11 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 3 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 3 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=12 + local.set $8 + loop $for-loop|00 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $0 + local.get $5 + i32.add + local.get $6 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $14 + local.get $14 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $14 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9504 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $5 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $3 + local.get $9 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9536 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $6 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 2 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 2 + i32.add + local.set $8 + local.get $2 + i32.load offset=4 + local.set $12 + local.get $2 + i32.load offset=12 + local.set $13 + loop $for-loop|01 + local.get $0 + local.get $13 + i32.lt_s + if + local.get $0 + local.get $8 + i32.add + local.get $12 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $15 + local.get $15 + f64.sub + f64.const 0 + f64.eq + if (result i32) + f64.const 0 + f64.const 255 + local.get $15 + f64.min + f64.max + i32.trunc_f64_u + else + i32.const 0 + end + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9568 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__retain + local.set $2 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $2 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + local.get $0 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $0 + i32.load offset=4 + local.get $1 + i32.load offset=4 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + local.get $10 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 + local.get $3 + call $~lib/rt/pure/__retain + local.set $1 + i32.const 8944 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=12 + i32.const 7 + i32.add + local.get $1 + i32.load offset=8 + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 7 + i32.add + local.set $8 + local.get $2 + i32.load offset=4 + local.set $12 + local.get $2 + i32.load offset=12 + local.set $13 + loop $for-loop|02 + local.get $0 + local.get $13 + i32.lt_s + if + local.get $0 + local.get $8 + i32.add + local.get $0 + local.get $12 + i32.add + i32.load8_s + local.tee $7 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $7 + i32.const 255 + local.get $7 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 8944 + call $~lib/rt/pure/__release + local.get $3 + i32.const 10 + i32.const 0 + i32.const 63 + i32.const 9600 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $16 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $11 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + return end - local.get $1 - i32.load offset=4 - local.get $5 - i32.load offset=4 - local.get $5 - i32.load offset=8 - call $~lib/memory/memory.copy - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $0 - local.get $4 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 9600 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $1 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - local.get $9 - call $~lib/rt/pure/__release - local.get $10 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -25777,21 +24640,25 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $3 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8768 + local.get $3 call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 + local.tee $1 + i32.load offset=8 i32.const 3 + i32.shr_u + i32.const 6 i32.add local.get $0 i32.load offset=8 @@ -25808,58 +24675,49 @@ end local.get $0 i32.load offset=4 - i32.const 6 + i32.const 12 i32.add local.set $4 - local.get $2 + local.get $1 i32.load offset=4 local.set $5 - local.get $2 - i32.load offset=12 + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u local.set $6 loop $for-loop|0 - local.get $1 + local.get $2 local.get $6 i32.lt_s if local.get $4 - local.get $1 + local.get $2 i32.const 1 i32.shl i32.add local.get $5 - local.get $1 - i32.const 2 + local.get $2 + i32.const 3 i32.shl i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store16 - local.get $1 + i64.load + i64.store16 + local.get $2 i32.const 1 i32.add - local.set $1 + local.set $2 br $for-loop|0 end end - local.get $2 + local.get $1 call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8768 + local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) (local $4 i32) @@ -25875,10 +24733,6 @@ call $~lib/rt/pure/__retain local.tee $1 i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add local.get $0 i32.load offset=8 i32.const 1 @@ -25894,16 +24748,12 @@ end local.get $0 i32.load offset=4 - i32.const 12 - i32.add local.set $4 local.get $1 i32.load offset=4 local.set $5 local.get $1 i32.load offset=8 - i32.const 3 - i32.shr_u local.set $6 loop $for-loop|0 local.get $2 @@ -25915,13 +24765,11 @@ i32.const 1 i32.shl i32.add - local.get $5 local.get $2 - i32.const 3 - i32.shl + local.get $5 i32.add - i64.load - i64.store16 + i32.load8_u + i32.store16 local.get $2 i32.const 1 i32.add @@ -25936,21 +24784,21 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8864 + local.get $2 call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 + local.tee $1 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 i32.add local.get $0 i32.load offset=8 @@ -25967,181 +24815,32 @@ end local.get $0 i32.load offset=4 - i32.const 4 + i32.const 8 i32.add - local.set $4 - local.get $2 + local.get $1 i32.load offset=4 - local.set $5 + local.get $1 + i32.load offset=8 + call $~lib/memory/memory.copy + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 1 - i32.shl - i32.add - local.get $2 - local.get $5 - i32.add - i32.load8_u - i32.store16 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $2 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.get $1 - i32.load offset=4 - local.get $1 - i32.load offset=8 - call $~lib/memory/memory.copy - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8944 - call $~lib/rt/pure/__retain - local.tee $2 + call $~lib/rt/pure/__release + ) + (func $~lib/typedarray/Int16Array#set<~lib/array/Array> (param $0 i32) + (local $1 i32) + (local $2 i32) + (local $3 i32) + (local $4 i32) + (local $5 i32) + local.get $0 + call $~lib/rt/pure/__retain + local.set $0 + i32.const 8944 + call $~lib/rt/pure/__retain + local.tee $2 i32.load offset=12 i32.const 7 i32.add @@ -26208,138 +24907,286 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int16Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 64 i32.const 9632 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9728 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9776 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9824 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 64 - i32.const 9872 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 6 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9728 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9776 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 4 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9824 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 64 + i32.const 9872 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Uint16Array#__uget (param $0 i32) (param $1 i32) (result i32) local.get $0 @@ -26422,312 +25269,296 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) + (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> + (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 f32) + (local $3 i32) (local $4 i32) (local $5 i32) (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 + (local $7 i32) + (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 6 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint16Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 4 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 1 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store16 - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 - i64.const 7 - call $~lib/typedarray/Int64Array#__set - local.get $2 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + i32.const 0 + i64.const 7 + call $~lib/typedarray/Int64Array#__set + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint16Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 1 i32.const 65 i32.const 9920 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - call $~lib/typedarray/Uint16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10016 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10064 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $0 - call $~lib/typedarray/Uint16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10112 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int16Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 1 - i32.const 65 - i32.const 10160 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 6 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $10 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10016 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10064 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 4 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + i32.add + local.get $14 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $11 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10112 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int16Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int16Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 1 + i32.const 65 + i32.const 10160 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint16Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -26837,88 +25668,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_s - else - i32.const 0 - end - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -26996,88 +25745,6 @@ local.get $3 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_s - else - i32.const 0 - end - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -27300,138 +25967,285 @@ (local $6 i32) (local $7 i32) (local $8 i32) - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - i32.const 0 + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $5 + i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int32Array#constructor - local.tee $5 + local.tee $13 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 16 i32.const 10208 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10320 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10384 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10448 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $14 call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 16 - i32.const 10512 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 12 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + local.tee $10 + i32.add + local.get $8 + local.get $10 + i32.add + f32.load + local.tee $11 + local.get $11 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $11 + i32.trunc_f32_s + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10320 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10384 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $10 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $12 + local.get $12 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $12 + i32.trunc_f64_s + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10448 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 16 + i32.const 10512 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> (param $0 i32) (param $1 i32) (local $2 i32) @@ -27505,170 +26319,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 12 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i32) - local.get $3 - i32.trunc_f32_u - else - i32.const 0 - end - i32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint32Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i32) - local.get $3 - i32.trunc_f64_u - else - i32.const 0 - end - i32.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> (local $0 i32) (local $1 i32) @@ -27679,138 +26329,285 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 i32) + (local $11 f32) + (local $12 f64) + (local $13 i32) + (local $14 i32) + (local $15 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint32Array#constructor - local.tee $5 + local.tee $13 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 + local.get $1 i32.const 10 i32.const 2 i32.const 66 i32.const 10576 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - call $~lib/typedarray/Uint32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10688 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10752 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $0 - call $~lib/typedarray/Uint32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10816 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 + local.tee $14 call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int32Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 2 - i32.const 66 - i32.const 10880 - call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 3 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 12 + i32.add + local.set $7 + local.get $3 + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + local.tee $10 + i32.add + local.get $8 + local.get $10 + i32.add + f32.load + local.tee $11 + local.get $11 + f32.sub + f32.const 0 + f32.eq + if (result i32) + local.get $11 + i32.trunc_f32_u + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10688 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10752 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $10 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $10 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $12 + local.get $12 + f64.sub + f64.const 0 + f64.eq + if (result i32) + local.get $12 + i32.trunc_f64_u + else + i32.const 0 + end + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10816 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int32Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int32Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 2 + i32.const 66 + i32.const 10880 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint32Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $14 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return + end + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) (local $1 i32) @@ -27959,88 +26756,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_s - else - i64.const 0 - end - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) (local $2 i32) local.get $1 @@ -28086,88 +26801,6 @@ local.get $2 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Int64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8864 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - i32.const 2 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $3 - i64.trunc_f64_s - else - i64.const 0 - end - i64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8864 - call $~lib/rt/pure/__release - ) (func $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) @@ -28390,361 +27023,347 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Int64Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 10944 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11104 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11216 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 67 - i32.const 11328 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 i32.const 10 i32.const 3 i32.const 67 - i32.const 11440 + i32.const 10944 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i64) - (local $5 i64) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 712 + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 local.get $2 + i32.load offset=4 + i32.const 24 + i32.add + local.set $7 local.get $3 - i32.lt_s - if + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#__uget - local.tee $4 - local.get $1 - local.get $2 - call $~lib/typedarray/Int64Array#__uget - local.tee $5 - i64.ne + local.get $9 + i32.lt_s if - i32.const 11664 + local.get $7 + local.get $0 i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.convert_i64_u - local.get $5 - f64.convert_i64_u - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1360 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable - end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 f32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - i32.const 8768 - call $~lib/rt/pure/__retain - local.tee $2 - i32.load offset=12 - i32.const 3 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $2 - i32.load offset=4 - local.set $5 - local.get $2 - i32.load offset=12 - local.set $6 - loop $for-loop|0 + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $10 + i64.trunc_f32_s + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release local.get $1 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $1 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $3 - local.get $3 - f32.sub - f32.const 0 - f32.eq - if (result i64) - local.get $3 - i64.trunc_f32_u - else - i64.const 0 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11104 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11216 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 16 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $16 + i32.add + local.get $14 + local.get $16 + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $11 + i64.trunc_f64_s + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 end - i64.store - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11328 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 67 + i32.const 11440 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Int64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return end - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 8768 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable ) - (func $~lib/typedarray/Uint64Array#set<~lib/array/Array> (param $0 i32) - (local $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> (param $0 i32) (param $1 i32) (local $2 i32) - (local $3 f64) - (local $4 i32) - (local $5 i32) - (local $6 i32) - (local $7 i32) + (local $3 i32) + (local $4 i64) + (local $5 i64) local.get $0 call $~lib/rt/pure/__retain local.set $0 - i32.const 8864 + local.get $1 call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=12 - i32.const 2 - i32.add + local.set $1 local.get $0 i32.load offset=8 i32.const 3 i32.shr_u - i32.gt_s + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 + i32.const 0 + i32.const 1360 + i32.const 712 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=12 - local.set $6 loop $for-loop|0 local.get $2 - local.get $6 + local.get $3 i32.lt_s if - local.get $4 + local.get $0 local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - f64.load - local.tee $3 - local.get $3 - f64.sub - f64.const 0 - f64.eq - if (result i64) - local.get $3 - i64.trunc_f64_u - else - i64.const 0 + call $~lib/typedarray/Int64Array#__uget + local.tee $4 + local.get $1 + local.get $2 + call $~lib/typedarray/Int64Array#__uget + local.tee $5 + i64.ne + if + i32.const 11664 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.convert_i64_u + local.get $5 + f64.convert_i64_u + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1360 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable end - i64.store local.get $2 i32.const 1 i32.add @@ -28752,11 +27371,9 @@ br $for-loop|0 end end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - i32.const 8864 + local.get $1 call $~lib/rt/pure/__release ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> @@ -28769,362 +27386,356 @@ (local $6 i32) (local $7 i32) (local $8 i32) + (local $9 i32) + (local $10 f32) + (local $11 f64) + (local $12 i32) + (local $13 i32) + (local $14 i32) + (local $15 i32) + (local $16 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $2 + local.tee $5 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $2 + local.get $5 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $1 + local.tee $4 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $1 + local.get $4 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $3 + local.tee $6 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $3 + local.get $6 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set i32.const 10 call $~lib/typedarray/Uint64Array#constructor - local.tee $5 + local.tee $12 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $1 call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11552 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11712 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - local.get $2 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11824 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $8 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $0 - call $~lib/typedarray/Uint64Array#set<~lib/array/Array> - local.get $0 - i32.const 10 - i32.const 3 - i32.const 68 - i32.const 11936 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $4 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $0 local.get $1 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> - local.get $0 - local.get $3 - call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> - local.get $0 - call $~lib/typedarray/Int64Array#set<~lib/array/Array> - local.get $0 i32.const 10 i32.const 3 i32.const 68 - i32.const 12048 + i32.const 11552 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $4 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - local.get $8 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#__uget (param $0 i32) (param $1 i32) (result f32) - local.get $0 - i32.load offset=4 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - ) - (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 f32) - (local $5 f32) - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 local.get $1 call $~lib/rt/pure/__retain - local.set $1 - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.tee $3 - local.get $1 - i32.load offset=12 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 712 + local.set $2 + block $folding-inner0 + i32.const 8768 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 i32.const 3 - call $~lib/builtins/abort - unreachable - end - loop $for-loop|0 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 local.get $2 + i32.load offset=4 + i32.const 24 + i32.add + local.set $7 local.get $3 - i32.lt_s - if + i32.load offset=4 + local.set $8 + local.get $3 + i32.load offset=12 + local.set $9 + loop $for-loop|0 local.get $0 - local.get $2 - call $~lib/typedarray/Float32Array#__uget - local.tee $4 - local.get $1 - local.get $2 - call $~lib/typedarray/Float32Array#__uget - local.tee $5 - f32.ne + local.get $9 + i32.lt_s if - i32.const 12224 + local.get $7 + local.get $0 i32.const 3 - local.get $2 - f64.convert_i32_s - local.get $4 - f64.promote_f32 - local.get $5 - f64.promote_f32 - f64.const 0 - f64.const 0 - call $~lib/builtins/trace - i32.const 0 - i32.const 1360 - i32.const 718 - i32.const 7 - call $~lib/builtins/abort - unreachable + i32.shl + i32.add + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $10 + local.get $10 + f32.sub + f32.const 0 + f32.eq + if (result i64) + local.get $10 + i64.trunc_f32_u + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 end - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 end - end - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 24 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $6 - loop $for-loop|0 + local.get $3 + call $~lib/rt/pure/__release local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 3 - i32.shl - i32.add - i64.load - f32.convert_i64_s - f32.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 + call $~lib/rt/pure/__release + i32.const 8768 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11712 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $7 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $1 + local.get $5 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int64Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11824 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $8 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 8864 + call $~lib/rt/pure/__retain + local.tee $3 + i32.load offset=12 + i32.const 2 + i32.add + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $2 + i32.load offset=4 + i32.const 16 + i32.add + local.set $9 + local.get $3 + i32.load offset=4 + local.set $14 + local.get $3 + i32.load offset=12 + local.set $15 + loop $for-loop|00 + local.get $0 + local.get $15 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $16 + i32.add + local.get $14 + local.get $16 + i32.add + f64.load + local.tee $11 + local.get $11 + f64.sub + f64.const 0 + f64.eq + if (result i64) + local.get $11 + i64.trunc_f64_u + else + i64.const 0 + end + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end + local.get $3 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 8864 + call $~lib/rt/pure/__release + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 11936 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $1 + local.get $4 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Uint8Array> + local.get $1 + local.get $6 + call $~lib/typedarray/Int64Array#set<~lib/typedarray/Int16Array> + local.get $1 + call $~lib/typedarray/Int64Array#set<~lib/array/Array> + local.get $1 + i32.const 10 + i32.const 3 + i32.const 68 + i32.const 12048 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $0 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint64Array> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $12 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $13 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $8 + call $~lib/rt/pure/__release + return end - local.get $1 - call $~lib/rt/pure/__release + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 + call $~lib/builtins/abort + unreachable + ) + (func $~lib/typedarray/Float32Array#__uget (param $0 i32) (param $1 i32) (result f32) local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release + i32.load offset=4 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load ) - (func $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) + (func $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 + (local $4 f32) + (local $5 f32) local.get $0 call $~lib/rt/pure/__retain local.set $0 - local.get $3 + local.get $1 call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add + local.set $1 local.get $0 i32.load offset=8 i32.const 2 i32.shr_u - i32.gt_s + local.tee $3 + local.get $1 + i32.load offset=12 + i32.ne if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 + i32.const 0 + i32.const 1360 + i32.const 712 + i32.const 3 call $~lib/builtins/abort unreachable end - local.get $0 - i32.load offset=4 - i32.const 16 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 loop $for-loop|0 local.get $2 - local.get $6 + local.get $3 i32.lt_s if - local.get $4 + local.get $0 local.get $2 - i32.const 2 - i32.shl - i32.add - local.get $5 + call $~lib/typedarray/Float32Array#__uget + local.tee $4 + local.get $1 local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f32.convert_i32_s - f32.store + call $~lib/typedarray/Float32Array#__uget + local.tee $5 + f32.ne + if + i32.const 12224 + i32.const 3 + local.get $2 + f64.convert_i32_s + local.get $4 + f64.promote_f32 + local.get $5 + f64.promote_f32 + f64.const 0 + f64.const 0 + call $~lib/builtins/trace + i32.const 0 + i32.const 1360 + i32.const 718 + i32.const 7 + call $~lib/builtins/abort + unreachable + end local.get $2 i32.const 1 i32.add @@ -29132,11 +27743,9 @@ br $for-loop|0 end end - local.get $1 - call $~lib/rt/pure/__release local.get $0 call $~lib/rt/pure/__release - local.get $3 + local.get $1 call $~lib/rt/pure/__release ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> @@ -29157,47 +27766,47 @@ (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $7 + local.tee $10 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $10 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $7 + local.get $10 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $7 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $7 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $8 + local.tee $11 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $11 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $8 + local.get $11 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -29205,7 +27814,7 @@ call $~lib/typedarray/Float32Array#constructor local.tee $14 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $4 call $~lib/rt/pure/__retain local.set $1 block $folding-inner0 @@ -29221,26 +27830,26 @@ br_if $folding-inner0 local.get $1 i32.load offset=4 - local.set $9 + local.set $12 local.get $2 i32.load offset=4 - local.set $10 + local.set $13 local.get $2 i32.load offset=12 - local.set $11 + local.set $8 loop $for-loop|0 local.get $0 - local.get $11 + local.get $8 i32.lt_s if - local.get $9 + local.get $12 local.get $0 i32.const 2 i32.shl - local.tee $6 + local.tee $5 i32.add - local.get $6 - local.get $10 + local.get $5 + local.get $13 i32.add i32.load f32.convert_i32_s @@ -29258,16 +27867,16 @@ call $~lib/rt/pure/__release i32.const 8688 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 i32.const 12160 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $12 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.set $0 i32.const 8768 @@ -29297,36 +27906,99 @@ call $~lib/rt/pure/__release i32.const 8768 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 i32.const 12272 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> + i32.const 0 + local.set $0 + local.get $10 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 local.get $3 - local.get $7 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int64Array> + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 24 + i32.add + local.set $8 + local.get $2 + i32.load offset=4 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|00 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $8 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + i64.load + f32.convert_i64_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 + call $~lib/rt/pure/__release + local.get $4 i32.const 10 i32.const 2 i32.const 61 i32.const 12336 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $11 + local.tee $8 call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> i32.const 0 local.set $0 - local.get $5 + local.get $7 call $~lib/rt/pure/__retain - local.set $4 - local.get $3 + local.set $3 + local.get $4 call $~lib/rt/pure/__retain local.set $1 - local.get $4 + local.get $3 call $~lib/rt/pure/__retain local.tee $2 i32.load offset=8 @@ -29338,25 +28010,25 @@ br_if $folding-inner0 local.get $1 i32.load offset=4 - local.set $6 + local.set $5 local.get $2 i32.load offset=4 - local.set $12 + local.set $6 local.get $2 i32.load offset=8 - local.set $13 - loop $for-loop|00 + local.set $9 + loop $for-loop|01 local.get $0 - local.get $13 + local.get $9 i32.lt_s if - local.get $6 + local.get $5 local.get $0 i32.const 2 i32.shl i32.add local.get $0 - local.get $12 + local.get $6 i32.add i32.load8_u f32.convert_i32_u @@ -29365,21 +28037,84 @@ i32.const 1 i32.add local.set $0 - br $for-loop|00 + br $for-loop|01 end end local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $11 + call $~lib/rt/pure/__retain + local.set $3 local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 16 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $9 + loop $for-loop|02 + local.get $0 + local.get $9 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + f32.convert_i32_s + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 call $~lib/rt/pure/__release local.get $3 - local.get $8 - call $~lib/typedarray/Float32Array#set<~lib/typedarray/Int16Array> + call $~lib/rt/pure/__release i32.const 0 local.set $0 - local.get $3 + local.get $4 call $~lib/rt/pure/__retain local.set $1 i32.const 8944 @@ -29398,25 +28133,25 @@ i32.load offset=4 i32.const 28 i32.add - local.set $6 + local.set $5 local.get $2 i32.load offset=4 - local.set $12 + local.set $6 local.get $2 i32.load offset=12 - local.set $13 - loop $for-loop|01 + local.set $9 + loop $for-loop|03 local.get $0 - local.get $13 + local.get $9 i32.lt_s if - local.get $6 + local.get $5 local.get $0 i32.const 2 i32.shl i32.add local.get $0 - local.get $12 + local.get $6 i32.add i32.load8_s f32.convert_i32_s @@ -29425,7 +28160,7 @@ i32.const 1 i32.add local.set $0 - br $for-loop|01 + br $for-loop|03 end end local.get $2 @@ -29434,7 +28169,7 @@ call $~lib/rt/pure/__release i32.const 8944 call $~lib/rt/pure/__release - local.get $3 + local.get $4 i32.const 10 i32.const 2 i32.const 61 @@ -29445,21 +28180,21 @@ call $std/typedarray/valuesEqual<~lib/typedarray/Float32Array> local.get $0 call $~lib/rt/pure/__release - local.get $7 + local.get $10 call $~lib/rt/pure/__release - local.get $5 + local.get $7 call $~lib/rt/pure/__release - local.get $8 + local.get $11 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $3 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $12 call $~lib/rt/pure/__release - local.get $10 + local.get $13 call $~lib/rt/pure/__release - local.get $11 + local.get $8 call $~lib/rt/pure/__release return end @@ -29549,162 +28284,6 @@ local.get $1 call $~lib/rt/pure/__release ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> (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.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 6 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 48 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - local.tee $7 - i32.add - local.get $5 - local.get $7 - i32.add - i64.load - f64.convert_i64_s - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> (param $0 i32) (param $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) - (local $5 i32) - (local $6 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 4 - i32.add - local.get $0 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 32 - i32.add - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $4 - local.get $2 - i32.const 3 - i32.shl - i32.add - local.get $5 - local.get $2 - i32.const 1 - i32.shl - i32.add - i32.load16_s - f64.convert_i32_s - f64.store - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) (func $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> (local $0 i32) (local $1 i32) @@ -29723,47 +28302,47 @@ (local $14 i32) i32.const 3 call $~lib/typedarray/Int64Array#constructor - local.tee $6 + local.tee $11 i32.const 0 i64.const 7 call $~lib/typedarray/Int64Array#__set - local.get $6 + local.get $11 i32.const 1 i64.const 8 call $~lib/typedarray/Int64Array#__set - local.get $6 + local.get $11 i32.const 2 i64.const 9 call $~lib/typedarray/Int64Array#__set i32.const 4 call $~lib/typedarray/Uint8Array#constructor - local.tee $5 + local.tee $9 i32.const 0 i32.const 100 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 1 i32.const 101 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 2 i32.const 102 call $~lib/typedarray/Uint8Array#__set - local.get $5 + local.get $9 i32.const 3 i32.const 103 call $~lib/typedarray/Uint8Array#__set i32.const 3 call $~lib/typedarray/Int16Array#constructor - local.tee $7 + local.tee $12 i32.const 0 i32.const 1000 call $~lib/typedarray/Int16Array#__set - local.get $7 + local.get $12 i32.const 1 i32.const 1001 call $~lib/typedarray/Int16Array#__set - local.get $7 + local.get $12 i32.const 2 i32.const 1002 call $~lib/typedarray/Int16Array#__set @@ -29771,79 +28350,77 @@ call $~lib/typedarray/Float64Array#constructor local.tee $14 call $~lib/rt/pure/__retain - local.tee $0 + local.tee $4 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 block $folding-inner0 i32.const 8688 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 - local.set $8 - local.get $3 + local.set $13 + local.get $2 i32.load offset=4 - local.set $9 - local.get $3 - i32.load offset=12 local.set $10 + local.get $2 + i32.load offset=12 + local.set $6 loop $for-loop|0 - local.get $1 - local.get $10 + local.get $0 + local.get $6 i32.lt_s if - local.get $8 - local.get $1 + local.get $13 + local.get $0 i32.const 3 i32.shl i32.add - local.get $9 - local.get $1 + local.get $10 + local.get $0 i32.const 2 i32.shl i32.add i32.load f64.convert_i32_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 + local.set $0 br $for-loop|0 end end - local.get $3 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 8688 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12464 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $8 + local.tee $13 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.set $1 i32.const 0 - local.set $2 - local.get $1 + local.set $0 + local.get $4 call $~lib/rt/pure/__retain local.set $1 i32.const 8768 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 i32.const 3 i32.add @@ -29852,220 +28429,338 @@ i32.const 3 i32.shr_u i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end + br_if $folding-inner0 local.get $1 i32.load offset=4 i32.const 24 i32.add - local.set $4 - local.get $3 + local.set $10 + local.get $2 i32.load offset=4 - local.set $9 - local.get $3 + local.set $6 + local.get $2 i32.load offset=12 - local.set $10 + local.set $5 loop $for-loop|00 - local.get $2 - local.get $10 + local.get $0 + local.get $5 i32.lt_s if - local.get $4 - local.get $2 + local.get $10 + local.get $0 i32.const 3 i32.shl i32.add - local.get $9 - local.get $2 + local.get $6 + local.get $0 i32.const 2 i32.shl i32.add f32.load f64.promote_f32 f64.store - local.get $2 + local.get $0 i32.const 1 i32.add - local.set $2 + local.set $0 br $for-loop|00 end end - local.get $3 + local.get $2 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release i32.const 8768 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12624 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $9 + local.tee $10 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $0 - local.get $6 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int64Array> - local.get $0 + i32.const 0 + local.set $0 + local.get $11 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 6 + i32.add + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 48 + i32.add + local.set $6 + local.get $2 + i32.load offset=4 + local.set $5 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $7 + loop $for-loop|01 + local.get $0 + local.get $7 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 3 + i32.shl + local.tee $8 + i32.add + local.get $5 + local.get $8 + i32.add + i64.load + f64.convert_i64_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end + end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12736 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $10 + local.tee $6 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> i32.const 0 - local.set $1 - local.get $5 - call $~lib/rt/pure/__retain - local.set $4 - local.get $0 + local.set $0 + local.get $9 call $~lib/rt/pure/__retain - local.set $2 + local.set $3 local.get $4 call $~lib/rt/pure/__retain - local.tee $3 + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 i32.load offset=8 - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 - local.set $11 - local.get $3 + local.set $5 + local.get $2 i32.load offset=4 - local.set $12 - local.get $3 + local.set $7 + local.get $2 i32.load offset=8 - local.set $13 - loop $for-loop|001 - local.get $1 - local.get $13 + local.set $8 + loop $for-loop|02 + local.get $0 + local.get $8 i32.lt_s if - local.get $11 - local.get $1 + local.get $5 + local.get $0 i32.const 3 i32.shl i32.add - local.get $1 - local.get $12 + local.get $0 + local.get $7 i32.add i32.load8_u f64.convert_i32_u f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|001 + local.set $0 + br $for-loop|02 end end + local.get $2 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release local.get $3 call $~lib/rt/pure/__release + i32.const 0 + local.set $0 + local.get $12 + call $~lib/rt/pure/__retain + local.set $3 + local.get $4 + call $~lib/rt/pure/__retain + local.set $1 + local.get $3 + call $~lib/rt/pure/__retain + local.tee $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 4 + i32.add + local.get $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.gt_s + br_if $folding-inner0 + local.get $1 + i32.load offset=4 + i32.const 32 + i32.add + local.set $5 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|03 + local.get $0 + local.get $8 + i32.lt_s + if + local.get $5 + local.get $0 + i32.const 3 + i32.shl + i32.add + local.get $7 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + f64.convert_i32_s + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end local.get $2 call $~lib/rt/pure/__release - local.get $4 + local.get $1 + call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release - local.get $0 - local.get $7 - call $~lib/typedarray/Float64Array#set<~lib/typedarray/Int16Array> i32.const 0 - local.set $1 - local.get $0 + local.set $0 + local.get $4 call $~lib/rt/pure/__retain - local.set $2 + local.set $1 i32.const 8944 call $~lib/rt/pure/__retain - local.tee $3 + local.tee $2 i32.load offset=12 i32.const 7 i32.add - local.get $2 + local.get $1 i32.load offset=8 i32.const 3 i32.shr_u i32.gt_s br_if $folding-inner0 - local.get $2 + local.get $1 i32.load offset=4 i32.const 56 i32.add - local.set $11 - local.get $3 + local.set $5 + local.get $2 i32.load offset=4 - local.set $12 - local.get $3 + local.set $7 + local.get $2 i32.load offset=12 - local.set $13 - loop $for-loop|01 - local.get $1 - local.get $13 + local.set $8 + loop $for-loop|04 + local.get $0 + local.get $8 i32.lt_s if - local.get $11 - local.get $1 + local.get $5 + local.get $0 i32.const 3 i32.shl i32.add - local.get $1 - local.get $12 + local.get $0 + local.get $7 i32.add i32.load8_s f64.convert_i32_s f64.store - local.get $1 + local.get $0 i32.const 1 i32.add - local.set $1 - br $for-loop|01 + local.set $0 + br $for-loop|04 end end - local.get $3 - call $~lib/rt/pure/__release local.get $2 call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release i32.const 8944 call $~lib/rt/pure/__release - local.get $0 + local.get $4 i32.const 10 i32.const 3 i32.const 62 i32.const 12848 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $1 + local.tee $0 call $std/typedarray/valuesEqual<~lib/typedarray/Float64Array> - local.get $1 + local.get $0 call $~lib/rt/pure/__release - local.get $6 + local.get $11 call $~lib/rt/pure/__release - local.get $5 + local.get $9 call $~lib/rt/pure/__release - local.get $7 + local.get $12 call $~lib/rt/pure/__release local.get $14 call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $8 + local.get $4 call $~lib/rt/pure/__release - local.get $9 + local.get $13 call $~lib/rt/pure/__release local.get $10 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release return end i32.const 1424 @@ -30075,279 +28770,27 @@ call $~lib/builtins/abort unreachable ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> (param $0 i32) (param $1 i32) + (func $start:std/typedarray + (local $0 i32) + (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 f32) - (local $5 i32) - (local $6 i32) - (local $7 i32) - local.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 1 - i32.add - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $7 - i32.lt_s - if - local.get $2 - local.get $5 - i32.add - local.get $6 - local.get $2 - i32.const 2 - i32.shl - i32.add - f32.load - local.tee $4 - local.get $4 - f32.sub - f32.const 0 - f32.eq - if (result i32) - f32.const 0 - f32.const 255 - local.get $4 - f32.min - f32.max - i32.trunc_f32_u - else - i32.const 0 - end - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> (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.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 8 - i32.add - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - i32.const 8 - i32.add - local.set $5 - local.get $1 - i32.load offset=4 - local.set $6 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|0 - local.get $2 - local.get $7 - i32.lt_s - if - local.get $2 - local.get $5 - i32.add - local.get $6 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $4 - i32.const 31 - i32.shr_s - i32.const -1 - i32.xor - local.get $4 - i32.const 255 - local.get $4 - i32.sub - i32.const 31 - i32.shr_s - i32.or - i32.and - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> (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.get $1 - call $~lib/rt/pure/__retain - local.set $3 - local.get $0 - call $~lib/rt/pure/__retain - local.set $0 - local.get $3 - call $~lib/rt/pure/__retain - local.tee $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.get $0 - i32.load offset=8 - i32.gt_s - if - i32.const 1424 - i32.const 1488 - i32.const 1775 - i32.const 47 - call $~lib/builtins/abort - unreachable - end - local.get $0 - i32.load offset=4 - local.set $4 - local.get $1 - i32.load offset=4 - local.set $5 - local.get $1 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $6 - loop $for-loop|0 - local.get $2 - local.get $6 - i32.lt_s - if - local.get $2 - local.get $4 - i32.add - i32.const 255 - local.get $5 - local.get $2 - i32.const 2 - i32.shl - i32.add - i32.load - local.tee $7 - i32.const 255 - local.get $7 - i32.lt_u - select - i32.store8 - local.get $2 - i32.const 1 - i32.add - local.set $2 - br $for-loop|0 - end - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - ) - (func $start:std/typedarray - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - (local $4 i32) + (local $4 i32) (local $5 i32) (local $6 i32) (local $7 i32) (local $8 i32) - (local $9 f32) - (local $10 f64) + (local $9 i32) + (local $10 i32) (local $11 i32) (local $12 f32) (local $13 f64) (local $14 i32) (local $15 i32) (local $16 i32) - (local $17 i32) - (local $18 i32) - (local $19 i32) + (local $17 f32) + (local $18 f64) + (local $19 i64) (local $20 i32) (local $21 i32) (local $22 i32) @@ -30358,6 +28801,7 @@ (local $27 i32) (local $28 i32) (local $29 i32) + (local $30 i32) i32.const 0 call $std/typedarray/testInstantiate i32.const 5 @@ -30834,7 +29278,7 @@ i32.const 1760 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -30901,7 +29345,7 @@ i32.const 1792 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt8ArrayEqual i32.eqz if @@ -30940,11 +29384,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -31079,7 +29523,7 @@ i32.const 2048 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31148,7 +29592,7 @@ i32.const 2096 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $7 + local.tee $6 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31187,11 +29631,11 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 + local.get $7 call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $7 + local.get $6 call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release @@ -31466,7 +29910,7 @@ i32.const 2224 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $6 + local.tee $7 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31488,7 +29932,7 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $7 + local.tee $6 i32.const 5 i32.const 2 i32.const 16 @@ -31517,14 +29961,14 @@ i32.const 2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $11 + local.tee $9 i32.const 5 i32.const 2 i32.const 16 i32.const 2320 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $14 + local.tee $10 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31546,14 +29990,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $15 + local.tee $11 i32.const 5 i32.const 2 i32.const 16 i32.const 2368 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $16 + local.tee $14 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31575,14 +30019,14 @@ i32.const 3 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $17 + local.tee $15 i32.const 5 i32.const 2 i32.const 16 i32.const 2416 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $18 + local.tee $16 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31604,14 +30048,14 @@ i32.const 2 i32.const 4 call $~lib/typedarray/Int32Array#copyWithin - local.tee $19 + local.tee $20 i32.const 5 i32.const 2 i32.const 16 i32.const 2464 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $20 + local.tee $21 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31633,14 +30077,14 @@ i32.const -2 i32.const 2147483647 call $~lib/typedarray/Int32Array#copyWithin - local.tee $21 + local.tee $22 i32.const 5 i32.const 2 i32.const 16 i32.const 2512 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $22 + local.tee $23 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31662,14 +30106,14 @@ i32.const -2 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $23 + local.tee $24 i32.const 5 i32.const 2 i32.const 16 i32.const 2560 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $24 + local.tee $25 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31691,14 +30135,14 @@ i32.const -3 i32.const -2 call $~lib/typedarray/Int32Array#copyWithin - local.tee $25 + local.tee $26 i32.const 5 i32.const 2 i32.const 16 i32.const 2608 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $26 + local.tee $27 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31720,14 +30164,14 @@ i32.const -3 i32.const -1 call $~lib/typedarray/Int32Array#copyWithin - local.tee $27 + local.tee $28 i32.const 5 i32.const 2 i32.const 16 i32.const 2656 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $28 + local.tee $29 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31757,7 +30201,7 @@ i32.const 2704 call $~lib/rt/__newArray call $~lib/rt/pure/__retain - local.tee $29 + local.tee $30 call $std/typedarray/isInt32ArrayEqual i32.eqz if @@ -31778,12 +30222,16 @@ call $~lib/rt/pure/__release local.get $5 call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release local.get $7 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release local.get $8 call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release local.get $11 call $~lib/rt/pure/__release local.get $14 @@ -31792,12 +30240,6 @@ call $~lib/rt/pure/__release local.get $16 call $~lib/rt/pure/__release - local.get $17 - call $~lib/rt/pure/__release - local.get $18 - call $~lib/rt/pure/__release - local.get $19 - call $~lib/rt/pure/__release local.get $20 call $~lib/rt/pure/__release local.get $21 @@ -31816,9 +30258,11 @@ call $~lib/rt/pure/__release local.get $28 call $~lib/rt/pure/__release + local.get $29 + call $~lib/rt/pure/__release local.get $1 call $~lib/rt/pure/__release - local.get $29 + local.get $30 call $~lib/rt/pure/__release i32.const 5 call $~lib/typedarray/Int32Array#constructor @@ -32088,7 +30532,7 @@ call $~lib/rt/pure/__release i32.const 3 call $~lib/typedarray/Int8Array#constructor - local.tee $6 + local.tee $7 call $~lib/rt/pure/__retain local.tee $1 i32.const 0 @@ -32114,7 +30558,7 @@ local.set $5 local.get $2 i32.load offset=4 - local.set $7 + local.set $6 local.get $2 i32.load offset=8 local.set $8 @@ -32124,14 +30568,14 @@ i32.lt_s if local.get $0 - local.get $7 + local.get $6 i32.add i32.load8_s - local.set $11 + local.set $9 i32.const 4 global.set $~argumentsLength local.get $3 - local.get $11 + local.get $9 local.get $0 local.get $2 local.get $5 @@ -32151,4207 +30595,5229 @@ call $~lib/rt/pure/__release i32.const 2752 call $~lib/rt/pure/__release - block $folding-inner17 - block $folding-inner16 - block $folding-inner15 - block $folding-inner14 - block $folding-inner11 - block $folding-inner10 - block $folding-inner9 - block $folding-inner8 - block $folding-inner7 - block $folding-inner6 - block $folding-inner5 - block $folding-inner4 - block $folding-inner3 - block $folding-inner2 - block $folding-inner1 - block $folding-inner0 - local.get $3 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2784 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2816 - call $~lib/typedarray/Uint8Array#reduce - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 2848 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - loop $for-loop|00 + block $folding-inner18 + block $folding-inner17 + block $folding-inner16 + block $folding-inner15 + block $folding-inner14 + block $folding-inner11 + block $folding-inner10 + block $folding-inner9 + block $folding-inner8 + block $folding-inner7 + block $folding-inner6 + block $folding-inner5 + block $folding-inner4 + block $folding-inner3 + block $folding-inner2 + block $folding-inner1 + block $folding-inner0 + local.get $3 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $8 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $11 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $11 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|00 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 2848 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $0 - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 2880 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $8 - loop $for-loop|01 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $8 - i32.lt_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $11 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $11 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|01 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 2880 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2912 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2944 - call $~lib/typedarray/Int32Array#reduce - i32.const 6 - i32.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2976 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3008 - call $~lib/typedarray/Int64Array#reduce - i64.const 6 - i64.ne - br_if $folding-inner0 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3040 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|02 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set local.get $0 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $12 - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $12 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $9 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|02 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3040 - call $~lib/rt/pure/__release - local.get $9 - f32.const 6 - f32.ne - br_if $folding-inner0 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $0 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3072 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $7 - loop $for-loop|03 + i32.const 2784 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $0 - i32.const 3 - i32.shl - i32.add - f64.load - local.set $13 - i32.const 4 - global.set $~argumentsLength - local.get $10 - local.get $13 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $10 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|03 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3072 - call $~lib/rt/pure/__release - local.get $10 - f64.const 6 - f64.ne - br_if $folding-inner0 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3104 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|04 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2816 + call $~lib/typedarray/Uint8Array#reduce + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 0 - i32.ge_s - if + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 2848 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|00 local.get $0 - local.get $7 - i32.add - i32.load8_s - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|04 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $9 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $9 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|00 + end end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3104 - call $~lib/rt/pure/__release - local.get $3 - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 3136 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 3168 - call $~lib/typedarray/Uint8Array#reduceRight - i32.const 255 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3200 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|05 - local.get $0 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 2848 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 i32.const 0 - i32.ge_s - if - local.get $7 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 2880 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $8 + loop $for-loop|01 local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_s - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|05 + i32.lt_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $9 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $9 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|01 + end end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3200 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $6 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $1 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $3 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3232 - call $~lib/rt/pure/__retain - local.set $5 - local.get $2 - i32.load offset=4 - local.set $7 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|06 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 2880 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2912 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - i32.ge_s - if - local.get $7 - local.get $0 - i32.const 1 - i32.shl - i32.add - i32.load16_u - local.set $8 - i32.const 4 - global.set $~argumentsLength - local.get $3 - local.get $8 - local.get $0 - local.get $2 - local.get $5 - i32.load - call_indirect (type $i32_i32_i32_i32_=>_i32) - local.set $3 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|06 - end - end - local.get $5 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3232 - call $~lib/rt/pure/__release - local.get $3 - i32.const 65535 - i32.and - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $6 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 3264 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3296 - call $~lib/typedarray/Int32Array#reduceRight - i32.const 6 - i32.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 3328 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3360 - call $~lib/typedarray/Int64Array#reduceRight - i64.const 6 - i64.ne - br_if $folding-inner1 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $1 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - f32.const 0 - local.set $9 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3392 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|07 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2944 + call $~lib/typedarray/Int32Array#reduce + i32.const 6 + i32.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 i32.const 0 - i32.ge_s - if - local.get $6 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2976 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3008 + call $~lib/typedarray/Int64Array#reduce + i64.const 6 + i64.ne + br_if $folding-inner0 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3040 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + loop $for-loop|02 local.get $0 - i32.const 2 - i32.shl - i32.add - f32.load - local.set $12 - i32.const 4 - global.set $~argumentsLength - local.get $9 - local.get $12 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $17 + i32.const 4 + global.set $~argumentsLength + local.get $12 + local.get $17 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_f32_i32_i32_=>_f32) + local.set $12 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|02 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3040 + call $~lib/rt/pure/__release + local.get $12 + f32.const 6 + f32.ne + br_if $folding-inner0 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3072 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|03 local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_f32_i32_i32_=>_f32) - local.set $9 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $18 + i32.const 4 + global.set $~argumentsLength + local.get $13 + local.get $18 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_f64_i32_i32_=>_f64) + local.set $13 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|03 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3072 + call $~lib/rt/pure/__release + local.get $13 + f64.const 6 + f64.ne + br_if $folding-inner0 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3104 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|04 local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|07 + i32.const 0 + i32.ge_s + if + local.get $0 + local.get $6 + i32.add + i32.load8_s + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|04 + end end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3392 - call $~lib/rt/pure/__release - local.get $9 - f32.const 6 - f32.ne - br_if $folding-inner1 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $1 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $1 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - f64.const 0 - local.set $10 - local.get $1 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 3424 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - i32.const 1 - i32.sub - local.set $0 - loop $for-loop|08 + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3104 + call $~lib/rt/pure/__release + local.get $3 + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 3136 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 3168 + call $~lib/typedarray/Uint8Array#reduceRight + i32.const 255 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3200 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|05 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_s + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|05 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3200 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $7 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $3 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3232 + call $~lib/rt/pure/__retain + local.set $5 + local.get $2 + i32.load offset=4 + local.set $6 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|06 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $6 + local.get $0 + i32.const 1 + i32.shl + i32.add + i32.load16_u + local.set $8 + i32.const 4 + global.set $~argumentsLength + local.get $3 + local.get $8 + local.get $0 + local.get $2 + local.get $5 + i32.load + call_indirect (type $i32_i32_i32_i32_=>_i32) + local.set $3 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|06 + end + end + local.get $5 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3232 + call $~lib/rt/pure/__release + local.get $3 + i32.const 65535 + i32.and + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $7 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 3264 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 3296 + call $~lib/typedarray/Int32Array#reduceRight + i32.const 6 + i32.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 3328 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3360 + call $~lib/typedarray/Int64Array#reduceRight + i64.const 6 + i64.ne + br_if $folding-inner1 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + f32.const 0 + local.set $12 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3392 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|07 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $7 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.set $17 + i32.const 4 + global.set $~argumentsLength + local.get $12 + local.get $17 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_f32_i32_i32_=>_f32) + local.set $12 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|07 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3392 + call $~lib/rt/pure/__release + local.get $12 + f32.const 6 + f32.ne + br_if $folding-inner1 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + f64.const 0 + local.set $13 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3424 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + i32.const 1 + i32.sub + local.set $0 + loop $for-loop|08 + local.get $0 + i32.const 0 + i32.ge_s + if + local.get $7 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.set $18 + i32.const 4 + global.set $~argumentsLength + local.get $13 + local.get $18 + local.get $0 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_f64_i32_i32_=>_f64) + local.set $13 + local.get $0 + i32.const 1 + i32.sub + local.set $0 + br $for-loop|08 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3424 + call $~lib/rt/pure/__release + local.get $13 + f64.const 6 + f64.ne + br_if $folding-inner1 + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3456 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 3 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|09 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_s + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|09 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3456 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3488 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 4 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|010 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_u + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|010 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3488 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3520 + call $~lib/rt/pure/__retain + local.set $6 + local.get $2 + i32.load offset=8 + local.set $4 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 5 + call $~lib/rt/pure/__new + local.set $3 + local.get $4 + i32.const 0 + call $~lib/rt/pure/__new + local.set $5 + loop $for-loop|011 + local.get $0 + local.get $4 + i32.lt_s + if + local.get $0 + local.get $9 + i32.add + i32.load8_u + local.set $10 + i32.const 3 + global.set $~argumentsLength + local.get $0 + local.get $5 + i32.add + local.get $10 + local.get $0 + local.get $2 + local.get $6 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store8 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|011 + end + end + local.get $3 + local.get $5 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $5 + i32.store offset=4 + local.get $3 + local.get $4 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $6 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3520 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3552 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 6 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 1 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|012 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + local.tee $11 + i32.add + i32.load16_s + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|012 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3552 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3584 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 7 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 1 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|013 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 1 + i32.shl + local.tee $11 + i32.add + i32.load16_u + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store16 + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|013 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3584 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint16Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3616 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 8 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|014 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + i32.load + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|014 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3616 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $1 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3648 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 9 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|015 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + i32.load + local.set $14 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $14 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i32_i32_i32_=>_i32) + i32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|015 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3648 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint32Array#__get + i32.const 1 + i32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__get + i32.const 4 + i32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__get + i32.const 9 + i32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $1 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3680 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 10 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|016 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + i64.load + local.set $19 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $19 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i64_i32_i32_=>_i64) + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|016 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3680 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Int64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Int64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Int64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $1 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3712 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 11 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|017 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + i64.load + local.set $19 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $19 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $i64_i32_i32_=>_i64) + i64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|017 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3712 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Uint64Array#__get + i64.const 1 + i64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Uint64Array#__get + i64.const 4 + i64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Uint64Array#__get + i64.const 9 + i64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $1 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3744 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 12 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 2 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|018 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 2 + i32.shl + local.tee $11 + i32.add + f32.load + local.set $12 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $12 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $f32_i32_i32_=>_f32) + f32.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|018 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3744 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Float32Array#__get + f32.const 1 + f32.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float32Array#__get + f32.const 4 + f32.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float32Array#__get + f32.const 9 + f32.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $8 + call $~lib/rt/pure/__retain + local.tee $1 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $1 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $0 + local.get $1 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 3776 + call $~lib/rt/pure/__retain + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + local.get $2 + i32.load offset=4 + local.set $9 + i32.const 12 + i32.const 13 + call $~lib/rt/pure/__new + local.set $3 + local.get $6 + i32.const 3 + i32.shl + local.tee $10 + i32.const 0 + call $~lib/rt/pure/__new + local.set $4 + loop $for-loop|019 + local.get $0 + local.get $6 + i32.lt_s + if + local.get $9 + local.get $0 + i32.const 3 + i32.shl + local.tee $11 + i32.add + f64.load + local.set $13 + i32.const 3 + global.set $~argumentsLength + local.get $4 + local.get $11 + i32.add + local.get $13 + local.get $0 + local.get $2 + local.get $7 + i32.load + call_indirect (type $f64_i32_i32_=>_f64) + f64.store + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|019 + end + end + local.get $3 + local.get $4 + call $~lib/rt/pure/__retain + i32.store + local.get $3 + local.get $4 + i32.store offset=4 + local.get $3 + local.get $10 + i32.store offset=8 + local.get $3 + call $~lib/rt/pure/__retain + local.set $0 + local.get $7 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 3776 + call $~lib/rt/pure/__release + local.get $0 + i32.const 0 + call $~lib/typedarray/Float64Array#__get + f64.const 1 + f64.ne + br_if $folding-inner2 + local.get $0 + i32.const 1 + call $~lib/typedarray/Float64Array#__get + f64.const 4 + f64.ne + br_if $folding-inner3 + local.get $0 + i32.const 2 + call $~lib/typedarray/Float64Array#__get + f64.const 9 + f64.ne + br_if $folding-inner4 + local.get $8 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4160 + call $~lib/typedarray/Int8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4192 + call $~lib/typedarray/Int8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4224 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4256 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4288 + call $~lib/typedarray/Uint8Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4320 + call $~lib/typedarray/Uint8Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 4352 + call $~lib/typedarray/Int16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4384 + call $~lib/typedarray/Int16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 4416 + call $~lib/typedarray/Uint16Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4448 + call $~lib/typedarray/Uint16Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 4480 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4512 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 4544 + call $~lib/typedarray/Int32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4576 + call $~lib/typedarray/Int32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 4608 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4640 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 4672 + call $~lib/typedarray/Int64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4704 + call $~lib/typedarray/Int64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 4736 + call $~lib/typedarray/Float32Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4768 + call $~lib/typedarray/Float32Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4800 + call $~lib/typedarray/Float64Array#some + i32.eqz + br_if $folding-inner5 + local.get $0 + i32.const 4832 + call $~lib/typedarray/Float64Array#some + br_if $folding-inner6 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4864 + call $~lib/typedarray/Int8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 4896 + call $~lib/typedarray/Int8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4928 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 4960 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4992 + call $~lib/typedarray/Uint8Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5024 + call $~lib/typedarray/Uint8Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 5056 + call $~lib/typedarray/Int16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5088 + call $~lib/typedarray/Int16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 5120 + call $~lib/typedarray/Uint16Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5152 + call $~lib/typedarray/Uint16Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 5184 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5216 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 5248 + call $~lib/typedarray/Int32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5280 + call $~lib/typedarray/Int32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 5312 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5344 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 5376 + call $~lib/typedarray/Int64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5408 + call $~lib/typedarray/Int64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 5440 + call $~lib/typedarray/Float32Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5472 + call $~lib/typedarray/Float32Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 5504 + call $~lib/typedarray/Float64Array#findIndex + i32.const 1 + i32.ne + br_if $folding-inner7 + local.get $0 + i32.const 5536 + call $~lib/typedarray/Float64Array#findIndex + i32.const -1 + i32.ne + br_if $folding-inner8 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 5568 + call $~lib/typedarray/Int8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5600 + call $~lib/typedarray/Int8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 5632 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5664 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 5696 + call $~lib/typedarray/Uint8Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5728 + call $~lib/typedarray/Uint8Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 5760 + call $~lib/typedarray/Int16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5792 + call $~lib/typedarray/Int16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 5824 + call $~lib/typedarray/Uint16Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5856 + call $~lib/typedarray/Uint16Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 5888 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5920 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 5952 + call $~lib/typedarray/Int32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 5984 + call $~lib/typedarray/Int32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 6016 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6048 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 6 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 6080 + call $~lib/typedarray/Int64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6112 + call $~lib/typedarray/Int64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 6 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 6144 + call $~lib/typedarray/Float32Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6176 + call $~lib/typedarray/Float32Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 6 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 6208 + call $~lib/typedarray/Float64Array#every + i32.eqz + br_if $folding-inner9 + local.get $0 + i32.const 6240 + call $~lib/typedarray/Float64Array#every + br_if $folding-inner10 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int8Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 24 + i32.shl + i32.const 24 + i32.shr_s + call $~lib/typedarray/Int8Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6352 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + local.set $6 + loop $for-loop|020 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $1 + local.get $7 + i32.add + i32.load8_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|020 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6352 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 6384 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 255 + i32.and + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 6416 + call $~lib/typedarray/Uint8Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int16Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 16 + i32.shl + i32.const 16 + i32.shr_s + call $~lib/typedarray/Int16Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6448 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|021 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_s + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|021 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6448 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint16Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i32.const 65535 + i32.and + call $~lib/typedarray/Uint16Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6480 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 1 + i32.shr_u + local.set $6 + loop $for-loop|022 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 1 + i32.shl + i32.add + i32.load16_u + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $i32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|022 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6480 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 6512 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 6544 + call $~lib/typedarray/Int32Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 6576 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + i64.extend_i32_s + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 6608 + call $~lib/typedarray/Int64Array#forEach + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + f32.convert_i32_s + call $~lib/typedarray/Float32Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6640 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $6 + loop $for-loop|023 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 2 + i32.shl + i32.add + f32.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f32_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|023 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6640 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + global.set $std/typedarray/forEachCallCount + i32.const 3 + call $~lib/typedarray/Float64Array#constructor + local.tee $5 + call $~lib/rt/pure/__retain + local.tee $0 + global.set $std/typedarray/forEachSelf + local.get $0 + i32.const 0 + i32.const 6304 + i32.const 0 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + i32.const 6304 + i32.const 1 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + i32.const 6304 + i32.const 2 + call $~lib/array/Array#__get + f64.convert_i32_s + call $~lib/typedarray/Float64Array#__set + i32.const 0 + local.set $1 + local.get $0 + call $~lib/rt/pure/__retain + local.set $2 + i32.const 6672 + call $~lib/rt/pure/__retain + local.set $4 + local.get $2 + i32.load offset=4 + local.set $7 + local.get $2 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.set $6 + loop $for-loop|024 + local.get $1 + local.get $6 + i32.lt_s + if + local.get $7 + local.get $1 + i32.const 3 + i32.shl + i32.add + f64.load + i32.const 3 + global.set $~argumentsLength + local.get $1 + local.get $2 + local.get $4 + i32.load + call_indirect (type $f64_i32_i32_=>_none) + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|024 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + i32.const 6672 + call $~lib/rt/pure/__release + global.get $std/typedarray/forEachCallCount + i32.const 3 + i32.ne + br_if $folding-inner11 + local.get $5 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> + i32.const 1 + call $~lib/typedarray/Float64Array#constructor + local.tee $2 + i32.const 0 + f64.const nan:0x8000000000000 + call $~lib/typedarray/Float64Array#__set + local.get $2 + f64.const nan:0x8000000000000 + i32.const 0 + call $~lib/typedarray/Float64Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 607 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + local.get $2 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + i32.const 3 + i32.shr_u + local.tee $3 + i32.eqz + i32.const 1 + local.get $3 + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $1 + i32.load offset=4 + local.set $4 + loop $while-continue|0 + local.get $0 + local.get $3 + i32.lt_s + if + i32.const 1 + local.get $4 + local.get $0 + i32.const 3 + i32.shl + i32.add + f64.load + local.tee $13 + local.get $13 + f64.ne + local.get $13 + f64.const nan:0x8000000000000 + f64.eq + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|0 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1360 + i32.const 608 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 1 + call $~lib/typedarray/Float32Array#constructor + local.tee $3 + i32.const 0 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $3 + f32.const nan:0x400000 + i32.const 0 + call $~lib/typedarray/Float32Array#indexOf + i32.const -1 + i32.ne + if + i32.const 0 + i32.const 1360 + i32.const 613 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + i32.const 0 + local.set $0 + block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + local.get $3 + call $~lib/rt/pure/__retain + local.tee $1 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.tee $4 + i32.eqz + i32.const 1 + local.get $4 + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $1 + i32.load offset=4 + local.set $5 + loop $while-continue|025 + local.get $0 + local.get $4 + i32.lt_s + if + i32.const 1 + local.get $5 + local.get $0 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $12 + local.get $12 + f32.ne + local.get $12 + f32.const nan:0x400000 + f32.eq + select + if + local.get $1 + call $~lib/rt/pure/__release + i32.const 1 + br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $while-continue|025 + end + end + local.get $1 + call $~lib/rt/pure/__release + i32.const 0 + end + i32.eqz + if + i32.const 0 + i32.const 1360 + i32.const 614 + i32.const 3 + call $~lib/builtins/abort + unreachable + end + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int8Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int8Array#__set + local.get $0 + call $~lib/typedarray/Int8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int8Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8Array#__set + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $3 + local.get $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#__set + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint8Array#join + local.tee $3 + local.get $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int16Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int16Array#__set + local.get $0 + call $~lib/typedarray/Int16Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int16Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint16Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint16Array#__set + local.get $0 + call $~lib/typedarray/Uint16Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint16Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Int32Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Int32Array#__set + local.get $0 + call $~lib/typedarray/Int32Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int32Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 1 + i32.const 2 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 2 + i32.const 3 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 3 + i32.const 4 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + i32.const 4 + i32.const 5 + call $~lib/typedarray/Uint32Array#__set + local.get $0 + call $~lib/typedarray/Uint32Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint32Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Int64Array#__set + local.get $0 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Int64Array#__set + local.get $0 + call $~lib/typedarray/Int64Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Int64Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Uint64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + i64.const 1 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 1 + i64.const 2 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 2 + i64.const 3 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 3 + i64.const 4 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + i32.const 4 + i64.const 5 + call $~lib/typedarray/Uint64Array#__set + local.get $0 + call $~lib/typedarray/Uint64Array#join + local.tee $2 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner16 + local.get $0 + call $~lib/typedarray/Uint64Array#join + local.tee $3 + i32.const 7312 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner17 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float32Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f32.const 1 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 1 + f32.const 2 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 2 + f32.const 3 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 3 + f32.const 4 + call $~lib/typedarray/Float32Array#__set + local.get $0 + i32.const 4 + f32.const 5 + call $~lib/typedarray/Float32Array#__set + local.get $0 + call $~lib/typedarray/Float32Array#join + local.tee $2 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float32Array#join + local.tee $3 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 5 + call $~lib/typedarray/Float64Array#constructor + local.tee $1 + call $~lib/rt/pure/__retain + local.tee $0 + i32.const 0 + f64.const 1 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 1 + f64.const 2 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 2 + f64.const 3 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 3 + f64.const 4 + call $~lib/typedarray/Float64Array#__set + local.get $0 + i32.const 4 + f64.const 5 + call $~lib/typedarray/Float64Array#__set + local.get $0 + call $~lib/typedarray/Float64Array#join + local.tee $2 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner14 + local.get $0 + call $~lib/typedarray/Float64Array#join + local.tee $3 + i32.const 8480 + call $~lib/string/String.__eq + i32.eqz + br_if $folding-inner15 + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + i32.const 0 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $0 + i32.const 2 + global.set $~argumentsLength local.get $0 i32.const 0 - i32.ge_s + call $~lib/typedarray/Uint8Array.wrap@varargs + local.tee $2 + i32.load offset=8 if - local.get $6 - local.get $0 + i32.const 0 + i32.const 1360 + i32.const 691 i32.const 3 - i32.shl - i32.add - f64.load - local.set $13 - i32.const 4 - global.set $~argumentsLength - local.get $10 - local.get $13 - local.get $0 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_f64_i32_i32_=>_f64) - local.set $10 - local.get $0 - i32.const 1 - i32.sub - local.set $0 - br $for-loop|08 + call $~lib/builtins/abort + unreachable end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 3424 - call $~lib/rt/pure/__release - local.get $10 - f64.const 6 - f64.ne - br_if $folding-inner1 - local.get $5 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8ClampedArray#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint16Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint16Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - call $~lib/typedarray/Int32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - call $~lib/typedarray/Uint32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint32Array#__get - i32.const 1 - i32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint32Array#__get - i32.const 4 - i32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__get - i32.const 9 - i32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - call $~lib/typedarray/Int64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Int64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Int64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Int64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - call $~lib/typedarray/Uint64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Uint64Array#__get - i64.const 1 - i64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Uint64Array#__get - i64.const 4 - i64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint64Array#__get - i64.const 9 - i64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float32Array#__get - f32.const 1 - f32.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float32Array#__get - f32.const 4 - f32.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float32Array#__get - f32.const 9 - f32.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#map - local.tee $1 - i32.const 0 - call $~lib/typedarray/Float64Array#__get - f64.const 1 - f64.ne - br_if $folding-inner2 - local.get $1 - i32.const 1 - call $~lib/typedarray/Float64Array#__get - f64.const 4 - f64.ne - br_if $folding-inner3 - local.get $1 - i32.const 2 - call $~lib/typedarray/Float64Array#__get - f64.const 9 - f64.ne - br_if $folding-inner4 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayFilter<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayFilter<~lib/typedarray/Float64Array,f64> - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4160 - call $~lib/typedarray/Int8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4192 - call $~lib/typedarray/Int8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4224 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4256 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4288 - call $~lib/typedarray/Uint8Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4320 - call $~lib/typedarray/Uint8Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 4352 - call $~lib/typedarray/Int16Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4384 - call $~lib/typedarray/Int16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 4416 - call $~lib/typedarray/Uint16Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4448 - call $~lib/typedarray/Uint16Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 4480 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4512 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 4544 - call $~lib/typedarray/Int32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4576 - call $~lib/typedarray/Int32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 4608 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4640 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 4672 - call $~lib/typedarray/Int64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4704 - call $~lib/typedarray/Int64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 4736 - call $~lib/typedarray/Float32Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4768 - call $~lib/typedarray/Float32Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4800 - call $~lib/typedarray/Float64Array#some - i32.eqz - br_if $folding-inner5 - local.get $0 - i32.const 4832 - call $~lib/typedarray/Float64Array#some - br_if $folding-inner6 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4864 - call $~lib/typedarray/Int8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 4896 - call $~lib/typedarray/Int8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4928 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 4960 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4992 - call $~lib/typedarray/Uint8Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5024 - call $~lib/typedarray/Uint8Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 5056 - call $~lib/typedarray/Int16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5088 - call $~lib/typedarray/Int16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 5120 - call $~lib/typedarray/Uint16Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5152 - call $~lib/typedarray/Uint16Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 5184 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5216 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 5248 - call $~lib/typedarray/Int32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5280 - call $~lib/typedarray/Int32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 5312 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5344 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 5376 - call $~lib/typedarray/Int64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5408 - call $~lib/typedarray/Int64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 5440 - call $~lib/typedarray/Float32Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5472 - call $~lib/typedarray/Float32Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 5504 - call $~lib/typedarray/Float64Array#findIndex - i32.const 1 - i32.ne - br_if $folding-inner7 - local.get $0 - i32.const 5536 - call $~lib/typedarray/Float64Array#findIndex - i32.const -1 - i32.ne - br_if $folding-inner8 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 5568 - call $~lib/typedarray/Int8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5600 - call $~lib/typedarray/Int8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 5632 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5664 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 5696 - call $~lib/typedarray/Uint8Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5728 - call $~lib/typedarray/Uint8Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 5760 - call $~lib/typedarray/Int16Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5792 - call $~lib/typedarray/Int16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 5824 - call $~lib/typedarray/Uint16Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5856 - call $~lib/typedarray/Uint16Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 5888 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5920 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 5952 - call $~lib/typedarray/Int32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 5984 - call $~lib/typedarray/Int32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 6016 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6048 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 6 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 6080 - call $~lib/typedarray/Int64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6112 - call $~lib/typedarray/Int64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 6 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 6144 - call $~lib/typedarray/Float32Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6176 - call $~lib/typedarray/Float32Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 6 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 6208 - call $~lib/typedarray/Float64Array#every - i32.eqz - br_if $folding-inner9 - local.get $0 - i32.const 6240 - call $~lib/typedarray/Float64Array#every - br_if $folding-inner10 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int8Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 24 - i32.shl - i32.const 24 - i32.shr_s - call $~lib/typedarray/Int8Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6352 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - local.set $7 - loop $for-loop|09 + i32.const 2 + call $~lib/arraybuffer/ArrayBuffer#constructor + local.set $1 + local.get $0 + call $~lib/rt/pure/__release + i32.const 2 + global.set $~argumentsLength local.get $1 - local.get $7 - i32.lt_s + i32.const 2 + call $~lib/typedarray/Uint8Array.wrap@varargs + local.set $0 + local.get $2 + call $~lib/rt/pure/__release + local.get $0 + i32.load offset=8 if - local.get $1 - local.get $6 - i32.add - i32.load8_s + i32.const 0 + i32.const 1360 + i32.const 695 i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|09 + call $~lib/builtins/abort + unreachable end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6352 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 6384 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 255 - i32.and - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 6416 - call $~lib/typedarray/Uint8Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int16Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 16 - i32.shl - i32.const 16 - i32.shr_s - call $~lib/typedarray/Int16Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6448 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $7 - loop $for-loop|010 local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_s - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|010 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6448 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint16Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i32.const 65535 - i32.and - call $~lib/typedarray/Uint16Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6480 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 1 - i32.shr_u - local.set $7 - loop $for-loop|011 + call $~lib/rt/pure/__release + local.get $0 + call $~lib/rt/pure/__release + call $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> + call $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> + call $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> + call $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> + call $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> + i32.const 10 + call $~lib/typedarray/Uint8ClampedArray#constructor + local.set $0 + i32.const 3 + call $~lib/typedarray/Float32Array#constructor + local.tee $5 + i32.const 0 + f32.const 400 + call $~lib/typedarray/Float32Array#__set + local.get $5 + i32.const 1 + f32.const nan:0x400000 + call $~lib/typedarray/Float32Array#__set + local.get $5 + i32.const 2 + f32.const inf + call $~lib/typedarray/Float32Array#__set + i32.const 4 + call $~lib/typedarray/Int64Array#constructor + local.tee $1 + i32.const 0 + i64.const -10 + call $~lib/typedarray/Int64Array#__set local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 1 - i32.shl - i32.add - i32.load16_u - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $i32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|011 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6480 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 6512 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 6544 - call $~lib/typedarray/Int32Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 6576 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - i64.extend_i32_s - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 6608 - call $~lib/typedarray/Int64Array#forEach - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - f32.convert_i32_s - call $~lib/typedarray/Float32Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6640 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 2 - i32.shr_u - local.set $7 - loop $for-loop|012 + i32.const 1 + i64.const 100 + call $~lib/typedarray/Int64Array#__set local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 2 - i32.shl - i32.add - f32.load - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f32_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|012 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6640 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - global.set $std/typedarray/forEachCallCount - i32.const 3 - call $~lib/typedarray/Float64Array#constructor - local.tee $5 - call $~lib/rt/pure/__retain - local.tee $0 - global.set $std/typedarray/forEachSelf - local.get $0 - i32.const 0 - i32.const 6304 - i32.const 0 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - i32.const 6304 - i32.const 1 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - i32.const 6304 - i32.const 2 - call $~lib/array/Array#__get - f64.convert_i32_s - call $~lib/typedarray/Float64Array#__set - i32.const 0 - local.set $1 - local.get $0 - call $~lib/rt/pure/__retain - local.set $2 - i32.const 6672 - call $~lib/rt/pure/__retain - local.set $4 - local.get $2 - i32.load offset=4 - local.set $6 - local.get $2 - i32.load offset=8 - i32.const 3 - i32.shr_u - local.set $7 - loop $for-loop|013 + i32.const 2 + i64.const 10 + call $~lib/typedarray/Int64Array#__set local.get $1 - local.get $7 - i32.lt_s - if - local.get $6 - local.get $1 - i32.const 3 - i32.shl - i32.add - f64.load - i32.const 3 - global.set $~argumentsLength - local.get $1 - local.get $2 - local.get $4 - i32.load - call_indirect (type $f64_i32_i32_=>_none) - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|013 - end - end - local.get $4 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - i32.const 6672 - call $~lib/rt/pure/__release - global.get $std/typedarray/forEachCallCount - i32.const 3 - i32.ne - br_if $folding-inner11 - local.get $5 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayReverse<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayReverse<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayIndexOfAndLastIndexOf<~lib/typedarray/Float64Array,f64> - i32.const 1 - call $~lib/typedarray/Float64Array#constructor - local.tee $2 - i32.const 0 - f64.const nan:0x8000000000000 - call $~lib/typedarray/Float64Array#__set - local.get $2 - f64.const nan:0x8000000000000 - i32.const 0 - call $~lib/typedarray/Float64Array#indexOf - i32.const -1 - i32.ne - if - i32.const 0 - i32.const 1360 - i32.const 607 i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 (result i32) + i64.const 300 + call $~lib/typedarray/Int64Array#__set + i32.const 2 + call $~lib/typedarray/Int32Array#constructor + local.tee $7 i32.const 0 - local.get $2 + i32.const 300 + call $~lib/typedarray/Int32Array#__set + local.get $7 + i32.const 1 + i32.const -1 + call $~lib/typedarray/Int32Array#__set + i32.const 0 + local.set $2 + local.get $5 call $~lib/rt/pure/__retain - local.tee $1 + local.set $6 + local.get $0 + call $~lib/rt/pure/__retain + local.set $3 + local.get $6 + call $~lib/rt/pure/__retain + local.tee $4 i32.load offset=8 - i32.const 3 + i32.const 2 i32.shr_u - local.tee $3 - i32.ge_s i32.const 1 + i32.add + local.get $3 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 local.get $3 - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 - end - local.get $1 i32.load offset=4 - local.set $4 - loop $while-continue|0 - local.get $0 - local.get $3 + i32.const 1 + i32.add + local.set $9 + local.get $4 + i32.load offset=4 + local.set $10 + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $11 + loop $for-loop|026 + local.get $2 + local.get $11 i32.lt_s if - i32.const 1 - local.get $4 - local.get $0 - i32.const 3 - i32.shl + local.get $2 + local.get $9 i32.add - f64.load - local.tee $10 local.get $10 - f64.ne - local.get $10 - f64.const nan:0x8000000000000 - f64.eq - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float64Array,f64>|inlined.0 + local.get $2 + i32.const 2 + i32.shl + i32.add + f32.load + local.tee $12 + local.get $12 + f32.sub + f32.const 0 + f32.eq + if (result i32) + f32.const 0 + f32.const 255 + local.get $12 + f32.min + f32.max + i32.trunc_f32_u + else + i32.const 0 end - local.get $0 + i32.store8 + local.get $2 i32.const 1 i32.add - local.set $0 - br $while-continue|0 + local.set $2 + br $for-loop|026 end end + local.get $4 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $0 local.get $1 + i32.const 4 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> + i32.const 0 + local.set $2 + local.get $7 + call $~lib/rt/pure/__retain + local.set $6 + local.get $0 + call $~lib/rt/pure/__retain + local.set $3 + local.get $6 + call $~lib/rt/pure/__retain + local.tee $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + i32.const 8 + i32.add + local.get $3 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 + local.get $3 + i32.load offset=4 + i32.const 8 + i32.add + local.set $9 + local.get $4 + i32.load offset=4 + local.set $10 + local.get $4 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $11 + loop $for-loop|027 + local.get $2 + local.get $11 + i32.lt_s + if + local.get $2 + local.get $9 + i32.add + local.get $10 + local.get $2 + i32.const 2 + i32.shl + i32.add + i32.load + local.tee $8 + i32.const 31 + i32.shr_s + i32.const -1 + i32.xor + local.get $8 + i32.const 255 + local.get $8 + i32.sub + i32.const 31 + i32.shr_s + i32.or + i32.and + i32.store8 + local.get $2 + i32.const 1 + i32.add + local.set $2 + br $for-loop|027 + end + end + local.get $4 + call $~lib/rt/pure/__release + local.get $3 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $0 + i32.const 10 i32.const 0 - end - i32.eqz - if + i32.const 63 + i32.const 12960 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $10 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + i32.const 4 + call $~lib/typedarray/Uint32Array#constructor + local.tee $2 i32.const 0 - i32.const 1360 - i32.const 608 + i32.const 1 + call $~lib/typedarray/Uint32Array#__set + local.get $2 + i32.const 1 + i32.const 300 + call $~lib/typedarray/Uint32Array#__set + local.get $2 + i32.const 2 + i32.const 100 + call $~lib/typedarray/Uint32Array#__set + local.get $2 i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 1 - call $~lib/typedarray/Float32Array#constructor - local.tee $3 - i32.const 0 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $3 - f32.const nan:0x400000 - i32.const 0 - call $~lib/typedarray/Float32Array#indexOf - i32.const -1 - i32.ne - if + i32.const -1 + call $~lib/typedarray/Uint32Array#__set + i32.const 4 + call $~lib/typedarray/Int16Array#constructor + local.tee $3 i32.const 0 - i32.const 1360 - i32.const 613 + i32.const -10 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 1 + i32.const 100 + call $~lib/typedarray/Int16Array#__set + local.get $3 + i32.const 2 + i32.const 10 + call $~lib/typedarray/Int16Array#__set + local.get $3 i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 0 - local.set $0 - block $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 (result i32) + i32.const 300 + call $~lib/typedarray/Int16Array#__set i32.const 0 - local.get $3 + local.set $4 + local.get $2 call $~lib/rt/pure/__retain - local.tee $1 + local.set $9 + local.get $0 + call $~lib/rt/pure/__retain + local.set $6 + local.get $9 + call $~lib/rt/pure/__retain + local.tee $8 i32.load offset=8 i32.const 2 i32.shr_u - local.tee $4 - i32.ge_s - i32.const 1 - local.get $4 - select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 0 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $1 + local.get $6 + i32.load offset=8 + i32.gt_s + br_if $folding-inner18 + local.get $6 i32.load offset=4 - local.set $5 - loop $while-continue|014 - local.get $0 + local.set $11 + local.get $8 + i32.load offset=4 + local.set $14 + local.get $8 + i32.load offset=8 + i32.const 2 + i32.shr_u + local.set $15 + loop $for-loop|028 local.get $4 + local.get $15 i32.lt_s if - i32.const 1 - local.get $5 - local.get $0 + local.get $4 + local.get $11 + i32.add + i32.const 255 + local.get $14 + local.get $4 i32.const 2 i32.shl i32.add - f32.load - local.tee $9 - local.get $9 - f32.ne - local.get $9 - f32.const nan:0x400000 - f32.eq + i32.load + local.tee $16 + local.get $16 + i32.const 255 + i32.gt_u select - if - local.get $1 - call $~lib/rt/pure/__release - i32.const 1 - br $~lib/typedarray/INCLUDES<~lib/typedarray/Float32Array,f32>|inlined.0 - end - local.get $0 + i32.store8 + local.get $4 i32.const 1 i32.add - local.set $0 - br $while-continue|014 + local.set $4 + br $for-loop|028 end end - local.get $1 + local.get $8 call $~lib/rt/pure/__release + local.get $6 + call $~lib/rt/pure/__release + local.get $9 + call $~lib/rt/pure/__release + local.get $0 + local.get $3 + i32.const 5 + call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> + local.get $0 + i32.const 10 i32.const 0 + i32.const 63 + i32.const 12992 + call $~lib/rt/__newArray + call $~lib/rt/pure/__retain + local.tee $4 + call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> + local.get $0 + call $~lib/rt/pure/__release + local.get $5 + call $~lib/rt/pure/__release + local.get $1 + call $~lib/rt/pure/__release + local.get $7 + call $~lib/rt/pure/__release + local.get $10 + call $~lib/rt/pure/__release + local.get $2 + call $~lib/rt/pure/__release + local.get $3 + call $~lib/rt/pure/__release + local.get $4 + call $~lib/rt/pure/__release + return end - i32.eqz - if - i32.const 0 - i32.const 1360 - i32.const 614 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int8Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int8Array#__set - local.get $0 - call $~lib/typedarray/Int8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int8Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8Array#__set - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $3 - local.get $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#__set - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint8Array#join - local.tee $3 - local.get $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int16Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int16Array#__set - local.get $0 - call $~lib/typedarray/Int16Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int16Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint16Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint16Array#__set - local.get $0 - call $~lib/typedarray/Uint16Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint16Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Int32Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Int32Array#__set - local.get $0 - call $~lib/typedarray/Int32Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int32Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 1 - i32.const 2 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 2 - i32.const 3 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 3 - i32.const 4 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - i32.const 4 - i32.const 5 - call $~lib/typedarray/Uint32Array#__set - local.get $0 - call $~lib/typedarray/Uint32Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint32Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Int64Array#__set - local.get $0 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Int64Array#__set - local.get $0 - call $~lib/typedarray/Int64Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Int64Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Uint64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - i64.const 1 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 1 - i64.const 2 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 2 - i64.const 3 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 3 - i64.const 4 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - i32.const 4 - i64.const 5 - call $~lib/typedarray/Uint64Array#__set - local.get $0 - call $~lib/typedarray/Uint64Array#join - local.tee $2 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner16 - local.get $0 - call $~lib/typedarray/Uint64Array#join - local.tee $3 - i32.const 7312 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner17 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float32Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f32.const 1 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 1 - f32.const 2 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 2 - f32.const 3 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 3 - f32.const 4 - call $~lib/typedarray/Float32Array#__set - local.get $0 - i32.const 4 - f32.const 5 - call $~lib/typedarray/Float32Array#__set - local.get $0 - call $~lib/typedarray/Float32Array#join - local.tee $2 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/typedarray/Float32Array#join - local.tee $3 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 5 - call $~lib/typedarray/Float64Array#constructor - local.tee $1 - call $~lib/rt/pure/__retain - local.tee $0 - i32.const 0 - f64.const 1 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 1 - f64.const 2 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 2 - f64.const 3 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 3 - f64.const 4 - call $~lib/typedarray/Float64Array#__set - local.get $0 - i32.const 4 - f64.const 5 - call $~lib/typedarray/Float64Array#__set - local.get $0 - call $~lib/typedarray/Float64Array#join - local.tee $2 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner14 - local.get $0 - call $~lib/typedarray/Float64Array#join - local.tee $3 - i32.const 8480 - call $~lib/string/String.__eq - i32.eqz - br_if $folding-inner15 - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - i32.const 0 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $0 - i32.const 2 - global.set $~argumentsLength - local.get $0 - i32.const 0 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.tee $2 - i32.load offset=8 - if - i32.const 0 - i32.const 1360 - i32.const 691 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - i32.const 2 - call $~lib/arraybuffer/ArrayBuffer#constructor - local.set $1 - local.get $0 - call $~lib/rt/pure/__release - i32.const 2 - global.set $~argumentsLength - local.get $1 - i32.const 2 - call $~lib/typedarray/Uint8Array.wrap@varargs - local.set $0 - local.get $2 - call $~lib/rt/pure/__release - local.get $0 - i32.load offset=8 - if - i32.const 0 - i32.const 1360 - i32.const 695 - i32.const 3 - call $~lib/builtins/abort - unreachable - end - local.get $1 - call $~lib/rt/pure/__release - local.get $0 - call $~lib/rt/pure/__release - call $std/typedarray/testArrayWrap<~lib/typedarray/Int8Array,i8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8Array,u8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint8ClampedArray,u8> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int16Array,i16> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint16Array,u16> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int32Array,i32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint32Array,u32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Int64Array,i64> - call $std/typedarray/testArrayWrap<~lib/typedarray/Uint64Array,u64> - call $std/typedarray/testArrayWrap<~lib/typedarray/Float32Array,f32> - call $std/typedarray/testArrayWrap<~lib/typedarray/Float64Array,f64> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int8Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint8ClampedArray> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int16Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint16Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Int64Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Uint64Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Float32Array> - call $std/typedarray/testTypedArraySet<~lib/typedarray/Float64Array> - i32.const 10 - call $~lib/typedarray/Uint8ClampedArray#constructor - local.set $0 - i32.const 3 - call $~lib/typedarray/Float32Array#constructor - local.tee $4 - i32.const 0 - f32.const 400 - call $~lib/typedarray/Float32Array#__set - local.get $4 - i32.const 1 - f32.const nan:0x400000 - call $~lib/typedarray/Float32Array#__set - local.get $4 - i32.const 2 - f32.const inf - call $~lib/typedarray/Float32Array#__set - i32.const 4 - call $~lib/typedarray/Int64Array#constructor - local.tee $1 - i32.const 0 - i64.const -10 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 1 - i64.const 100 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 2 - i64.const 10 - call $~lib/typedarray/Int64Array#__set - local.get $1 - i32.const 3 - i64.const 300 - call $~lib/typedarray/Int64Array#__set - i32.const 2 - call $~lib/typedarray/Int32Array#constructor - local.tee $5 - i32.const 0 - i32.const 300 - call $~lib/typedarray/Int32Array#__set - local.get $5 - i32.const 1 - i32.const -1 - call $~lib/typedarray/Int32Array#__set - local.get $0 - local.get $4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Float32Array> - local.get $0 - local.get $1 - i32.const 4 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int64Array> - local.get $0 - local.get $5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int32Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 12960 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $6 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - i32.const 4 - call $~lib/typedarray/Uint32Array#constructor - local.tee $2 - i32.const 0 - i32.const 1 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 1 - i32.const 300 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 2 - i32.const 100 - call $~lib/typedarray/Uint32Array#__set - local.get $2 - i32.const 3 - i32.const -1 - call $~lib/typedarray/Uint32Array#__set - i32.const 4 - call $~lib/typedarray/Int16Array#constructor - local.tee $3 i32.const 0 - i32.const -10 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 1 - i32.const 100 - call $~lib/typedarray/Int16Array#__set - local.get $3 - i32.const 2 - i32.const 10 - call $~lib/typedarray/Int16Array#__set - local.get $3 + i32.const 1360 + i32.const 323 i32.const 3 - i32.const 300 - call $~lib/typedarray/Int16Array#__set - local.get $0 - local.get $2 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Uint32Array> - local.get $0 - local.get $3 - i32.const 5 - call $~lib/typedarray/Uint8ClampedArray#set<~lib/typedarray/Int16Array> - local.get $0 - i32.const 10 - i32.const 0 - i32.const 63 - i32.const 12992 - call $~lib/rt/__newArray - call $~lib/rt/pure/__retain - local.tee $7 - call $std/typedarray/valuesEqual<~lib/typedarray/Uint8ClampedArray> - local.get $0 - call $~lib/rt/pure/__release - local.get $4 - call $~lib/rt/pure/__release - local.get $1 - call $~lib/rt/pure/__release - local.get $5 - call $~lib/rt/pure/__release - local.get $6 - call $~lib/rt/pure/__release - local.get $2 - call $~lib/rt/pure/__release - local.get $3 - call $~lib/rt/pure/__release - local.get $7 - call $~lib/rt/pure/__release - return + call $~lib/builtins/abort + unreachable end i32.const 0 i32.const 1360 - i32.const 323 + i32.const 344 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 344 + i32.const 365 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 365 + i32.const 366 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 366 + i32.const 367 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 367 + i32.const 415 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 415 + i32.const 417 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 417 + i32.const 438 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 438 + i32.const 440 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 440 + i32.const 461 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 461 + i32.const 463 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 463 + i32.const 495 i32.const 3 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 495 - i32.const 3 + i32.const 626 + i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 626 + i32.const 627 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 627 + i32.const 629 i32.const 5 call $~lib/builtins/abort unreachable end i32.const 0 i32.const 1360 - i32.const 629 + i32.const 630 i32.const 5 call $~lib/builtins/abort unreachable end - i32.const 0 - i32.const 1360 - i32.const 630 - i32.const 5 + i32.const 1424 + i32.const 1488 + i32.const 1775 + i32.const 47 call $~lib/builtins/abort unreachable ) @@ -36430,8 +35896,7 @@ call $~lib/rt/tlsf/freeBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1232 diff --git a/tests/compiler/super-inline.optimized.wat b/tests/compiler/super-inline.optimized.wat index daba6f212c..19d8f463b1 100644 --- a/tests/compiler/super-inline.optimized.wat +++ b/tests/compiler/super-inline.optimized.wat @@ -42,9 +42,9 @@ i32.const 16 i32.shr_u local.tee $2 - local.get $4 local.get $2 - i32.gt_s + local.get $4 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/typeof.optimized.wat b/tests/compiler/typeof.optimized.wat index abcd09a4d6..773adad5a8 100644 --- a/tests/compiler/typeof.optimized.wat +++ b/tests/compiler/typeof.optimized.wat @@ -2,7 +2,6 @@ (type $none_=>_none (func)) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $i32_i32_=>_i32 (func (param i32 i32) (result i32))) - (type $i32_i32_i32_=>_i32 (func (param i32 i32 i32) (result i32))) (import "env" "abort" (func $~lib/builtins/abort (param i32 i32 i32 i32))) (memory $0 1) (data (i32.const 1036) "\0c\00\00\00\01\00\00\00\00\00\00\00\01\00\00\00\0c\00\00\00n\00u\00m\00b\00e\00r") @@ -17,84 +16,10 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/util/string/compareImpl (param $0 i32) (param $1 i32) (param $2 i32) (result i32) - (local $3 i32) - (local $4 i32) - local.get $0 - i32.const 7 - i32.and - local.get $1 - i32.const 7 - i32.and - i32.or - i32.eqz - i32.const 0 - local.get $2 - i32.const 4 - i32.ge_u - select - if - loop $do-continue|0 - local.get $0 - i64.load - local.get $1 - i64.load - i64.eq - if - local.get $0 - i32.const 8 - i32.add - local.set $0 - local.get $1 - i32.const 8 - i32.add - local.set $1 - local.get $2 - i32.const 4 - i32.sub - local.tee $2 - i32.const 4 - i32.ge_u - br_if $do-continue|0 - end - end - end - loop $while-continue|1 - local.get $2 - local.tee $3 - i32.const 1 - i32.sub - local.set $2 - local.get $3 - if - local.get $0 - i32.load16_u - local.tee $3 - local.get $1 - i32.load16_u - local.tee $4 - i32.ne - if - local.get $3 - local.get $4 - i32.sub - return - end - local.get $0 - i32.const 2 - i32.add - local.set $0 - local.get $1 - i32.const 2 - i32.add - local.set $1 - br $while-continue|1 - end - end - i32.const 0 - ) (func $~lib/string/String.__eq (param $0 i32) (param $1 i32) (result i32) (local $2 i32) + (local $3 i32) + (local $4 i32) local.get $0 local.get $1 i32.eq @@ -124,10 +49,82 @@ i32.shr_u i32.ne br_if $folding-inner0 - local.get $0 - local.get $1 - local.get $2 - call $~lib/util/string/compareImpl + block $__inlined_func$~lib/util/string/compareImpl (result i32) + local.get $0 + local.tee $3 + i32.const 7 + i32.and + local.get $1 + i32.const 7 + i32.and + i32.or + i32.eqz + i32.const 0 + local.get $2 + local.tee $0 + i32.const 4 + i32.ge_u + select + if + loop $do-continue|0 + local.get $3 + i64.load + local.get $1 + i64.load + i64.eq + if + local.get $3 + i32.const 8 + i32.add + local.set $3 + local.get $1 + i32.const 8 + i32.add + local.set $1 + local.get $0 + i32.const 4 + i32.sub + local.tee $0 + i32.const 4 + i32.ge_u + br_if $do-continue|0 + end + end + end + loop $while-continue|1 + local.get $0 + local.tee $2 + i32.const 1 + i32.sub + local.set $0 + local.get $2 + if + local.get $3 + i32.load16_u + local.tee $2 + local.get $1 + i32.load16_u + local.tee $4 + i32.ne + if + local.get $2 + local.get $4 + i32.sub + br $__inlined_func$~lib/util/string/compareImpl + end + local.get $3 + i32.const 2 + i32.add + local.set $3 + local.get $1 + i32.const 2 + i32.add + local.set $1 + br $while-continue|1 + end + end + i32.const 0 + end i32.eqz return end @@ -352,7 +349,6 @@ call $~lib/builtins/abort unreachable end - i32.const 1420 memory.size local.tee $1 i32.const 16 @@ -362,7 +358,8 @@ i32.const -16 i32.and local.tee $0 - i32.gt_u + i32.const 1420 + i32.lt_u if local.get $1 i32.const 66955 @@ -373,9 +370,9 @@ i32.const 16 i32.shr_u local.tee $0 - local.get $1 local.get $0 - i32.gt_s + local.get $1 + i32.lt_s select memory.grow i32.const 0 diff --git a/tests/compiler/wasi/abort.optimized.wat b/tests/compiler/wasi/abort.optimized.wat index 05dd74de1f..cc182b1549 100644 --- a/tests/compiler/wasi/abort.optimized.wat +++ b/tests/compiler/wasi/abort.optimized.wat @@ -65,11 +65,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -231,11 +231,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 3 local.set $2 i32.const 4 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -251,51 +250,51 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 19 i32.add - local.tee $1 + local.tee $0 i32.const 544106784 i32.store - local.get $1 + local.get $0 i32.const 4 i32.add - local.tee $1 + local.tee $0 i32.const 1104 i32.const 1100 i32.load i32.const 1 i32.shr_u - local.get $1 + local.get $0 call $~lib/string/String.UTF8.encodeUnsafe i32.add - local.tee $1 + local.tee $0 i32.const 40 i32.store8 i32.const 4 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $1 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 @@ -307,32 +306,32 @@ i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $2 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 + local.tee $0 local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 + local.get $2 + i32.const 10 + i32.div_u local.tee $2 br_if $do-continue|1 end + local.get $0 local.get $1 - local.get $3 i32.add - local.tee $2 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $2 + local.get $0 i32.const -10 i32.add i32.store diff --git a/tests/compiler/wasi/seed.optimized.wat b/tests/compiler/wasi/seed.optimized.wat index cd9cbcdff7..91dcb1f29d 100644 --- a/tests/compiler/wasi/seed.optimized.wat +++ b/tests/compiler/wasi/seed.optimized.wat @@ -128,11 +128,11 @@ i32.const 2 i32.add else + local.get $3 local.get $2 i32.const 2 i32.add - local.get $3 - i32.lt_u + i32.gt_u i32.const 0 local.get $1 i32.const 64512 @@ -294,11 +294,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 5 - local.set $1 + local.set $2 i32.const 1399 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -315,73 +314,73 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add - local.tee $2 + local.tee $0 i32.const 40 i32.store8 i32.const 1399 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $2 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 i32.store8 i32.const 5 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $1 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 - local.get $1 + local.tee $0 + local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $1 + local.get $2 + i32.const 10 + i32.div_u + local.tee $2 br_if $do-continue|1 end - local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.add - local.tee $1 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $1 + local.get $0 i32.const -10 i32.add i32.store diff --git a/tests/compiler/wasi/trace.optimized.wat b/tests/compiler/wasi/trace.optimized.wat index ce0a5ac17e..63cdde691b 100644 --- a/tests/compiler/wasi/trace.optimized.wat +++ b/tests/compiler/wasi/trace.optimized.wat @@ -5,7 +5,6 @@ (type $i32_f64_=>_i32 (func (param i32 f64) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_f64_f64_f64_f64_f64_=>_none (func (param i32 f64 f64 f64 f64 f64))) - (type $none_=>_i32 (func (result i32))) (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_i32_=>_i32 (func (param i32 i32 i32 i32) (result i32))) (type $i32_i64_i32_i64_i32_i64_i32_=>_i32 (func (param i32 i64 i32 i64 i32 i64 i32) (result i32))) @@ -27,87 +26,6 @@ (global $~started (mut i32) (i32.const 0)) (export "_start" (func $~start)) (export "memory" (memory $0)) - (func $~lib/string/String.UTF8.byteLength (result i32) - (local $0 i32) - (local $1 i32) - (local $2 i32) - (local $3 i32) - i32.const 1056 - local.set $0 - i32.const 1052 - i32.load - i32.const 1056 - i32.add - local.set $2 - loop $while-continue|0 - local.get $0 - local.get $2 - i32.lt_u - if - local.get $0 - i32.load16_u - local.tee $3 - i32.const 128 - i32.lt_u - if (result i32) - local.get $1 - i32.const 1 - i32.add - else - local.get $3 - i32.const 2048 - i32.lt_u - if (result i32) - local.get $1 - i32.const 2 - i32.add - else - local.get $0 - i32.const 2 - i32.add - local.get $2 - i32.lt_u - i32.const 0 - local.get $3 - i32.const 64512 - i32.and - i32.const 55296 - i32.eq - select - if - local.get $0 - i32.load16_u offset=2 - i32.const 64512 - i32.and - i32.const 56320 - i32.eq - if - local.get $1 - i32.const 4 - i32.add - local.set $1 - local.get $0 - i32.const 4 - i32.add - local.set $0 - br $while-continue|0 - end - end - local.get $1 - i32.const 3 - i32.add - end - end - local.set $1 - local.get $0 - i32.const 2 - i32.add - local.set $0 - br $while-continue|0 - end - end - local.get $1 - ) (func $~lib/string/String.UTF8.encodeUnsafe (param $0 i32) (param $1 i32) (param $2 i32) (result i32) (local $3 i32) (local $4 i32) @@ -161,11 +79,11 @@ i32.const 2 i32.add else + local.get $4 local.get $0 i32.const 2 i32.add - local.get $4 - i32.lt_u + i32.gt_u i32.const 0 local.get $3 i32.const 64512 @@ -501,6 +419,7 @@ i32.const 1 i32.sub local.set $9 + local.get $5 local.get $7 local.get $2 i64.extend_i32_u @@ -509,8 +428,7 @@ i64.shl i64.add local.tee $1 - local.get $5 - i64.le_u + i64.ge_u if local.get $9 global.get $~lib/util/number/_K @@ -553,11 +471,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -678,11 +596,11 @@ i64.lt_u select i32.const 0 + local.get $10 local.get $5 local.get $1 i64.sub - local.get $10 - i64.ge_u + i64.le_u i32.const 0 local.get $1 local.get $8 @@ -881,16 +799,7 @@ end ) (func $~lib/util/number/utoa_dec_simple (param $0 i32) (param $1 i32) (param $2 i32) - (local $3 i32) loop $do-continue|0 - local.get $1 - i32.const 10 - i32.rem_u - local.set $3 - local.get $1 - i32.const 10 - i32.div_u - local.set $1 local.get $0 local.get $2 i32.const 1 @@ -899,11 +808,16 @@ i32.const 1 i32.shl i32.add - local.get $3 + local.get $1 + i32.const 10 + i32.rem_u i32.const 48 i32.add i32.store16 local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end ) @@ -1001,9 +915,9 @@ i32.const 0 i32.le_s i32.const 0 - i32.const -6 local.get $3 - i32.lt_s + i32.const -6 + i32.gt_s select if (result i32) local.get $0 @@ -1505,11 +1419,10 @@ (local $1 i32) (local $2 i32) (local $3 i32) - (local $4 i32) i32.const 3 - local.set $1 + local.set $2 i32.const 89 - local.set $0 + local.set $1 i32.const 0 i32.const 12 i32.store @@ -1528,73 +1441,73 @@ call $~lib/string/String.UTF8.encodeUnsafe i32.const 23 i32.add - local.tee $2 + local.tee $0 i32.const 40 i32.store8 i32.const 89 call $~lib/util/number/decimalCount32 - local.tee $4 - local.get $2 + local.tee $3 + local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|0 local.get $0 - i32.const 10 - i32.div_u - local.get $3 i32.const 1 i32.sub - local.tee $3 - local.get $0 + local.tee $0 + local.get $1 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $0 + local.get $1 + i32.const 10 + i32.div_u + local.tee $1 br_if $do-continue|0 end + local.get $0 local.get $3 - local.get $4 i32.add local.tee $0 i32.const 58 i32.store8 i32.const 3 call $~lib/util/number/decimalCount32 - local.tee $2 + local.tee $1 local.get $0 i32.const 1 i32.add i32.add - local.set $3 + local.set $0 loop $do-continue|1 - local.get $1 - i32.const 10 - i32.div_u - local.get $3 + local.get $0 i32.const 1 i32.sub - local.tee $3 - local.get $1 + local.tee $0 + local.get $2 i32.const 10 i32.rem_u i32.const 48 i32.add i32.store8 - local.tee $1 + local.get $2 + i32.const 10 + i32.div_u + local.tee $2 br_if $do-continue|1 end - local.get $2 - local.get $3 + local.get $0 + local.get $1 i32.add - local.tee $1 + local.tee $0 i32.const 2601 i32.store16 i32.const 4 - local.get $1 + local.get $0 i32.const -10 i32.add i32.store @@ -1614,8 +1527,81 @@ (local $9 i32) (local $10 i32) (local $11 i32) - call $~lib/string/String.UTF8.byteLength - local.tee $7 + i32.const 1056 + local.set $6 + i32.const 1052 + i32.load + i32.const 1056 + i32.add + local.set $8 + loop $while-continue|0 + local.get $6 + local.get $8 + i32.lt_u + if + local.get $6 + i32.load16_u + local.tee $9 + i32.const 128 + i32.lt_u + if (result i32) + local.get $7 + i32.const 1 + i32.add + else + local.get $9 + i32.const 2048 + i32.lt_u + if (result i32) + local.get $7 + i32.const 2 + i32.add + else + local.get $8 + local.get $6 + i32.const 2 + i32.add + i32.gt_u + i32.const 0 + local.get $9 + i32.const 64512 + i32.and + i32.const 55296 + i32.eq + select + if + local.get $6 + i32.load16_u offset=2 + i32.const 64512 + i32.and + i32.const 56320 + i32.eq + if + local.get $7 + i32.const 4 + i32.add + local.set $7 + local.get $6 + i32.const 4 + i32.add + local.set $6 + br $while-continue|0 + end + end + local.get $7 + i32.const 3 + i32.add + end + end + local.set $7 + local.get $6 + i32.const 2 + i32.add + local.set $6 + br $while-continue|0 + end + end + local.get $7 i32.const 56 local.get $7 i32.const 56 diff --git a/tests/compiler/while.optimized.wat b/tests/compiler/while.optimized.wat index 74708a377e..5124a6f33a 100644 --- a/tests/compiler/while.optimized.wat +++ b/tests/compiler/while.optimized.wat @@ -1,8 +1,8 @@ (module (type $none_=>_none (func)) + (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_=>_none (func (param i32))) (type $i32_i32_=>_none (func (param i32 i32))) - (type $i32_=>_i32 (func (param i32) (result i32))) (type $i32_i32_i32_=>_none (func (param i32 i32 i32))) (type $i32_i32_i32_i32_=>_none (func (param i32 i32 i32 i32))) (type $none_=>_i32 (func (result i32))) @@ -651,85 +651,6 @@ local.get $1 call $~lib/rt/tlsf/insertBlock ) - (func $~lib/rt/tlsf/initialize - (local $0 i32) - (local $1 i32) - i32.const 1 - memory.size - local.tee $0 - i32.gt_s - if (result i32) - i32.const 1 - local.get $0 - i32.sub - memory.grow - i32.const 0 - i32.lt_s - else - i32.const 0 - end - if - unreachable - end - i32.const 1264 - i32.const 0 - i32.store - i32.const 2832 - i32.const 0 - i32.store - loop $for-loop|0 - local.get $1 - i32.const 23 - i32.lt_u - if - local.get $1 - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=4 - i32.const 0 - local.set $0 - loop $for-loop|1 - local.get $0 - i32.const 16 - i32.lt_u - if - local.get $0 - local.get $1 - i32.const 4 - i32.shl - i32.add - i32.const 2 - i32.shl - i32.const 1264 - i32.add - i32.const 0 - i32.store offset=96 - local.get $0 - i32.const 1 - i32.add - local.set $0 - br $for-loop|1 - end - end - local.get $1 - i32.const 1 - i32.add - local.set $1 - br $for-loop|0 - end - end - i32.const 1264 - i32.const 2836 - memory.size - i32.const 16 - i32.shl - call $~lib/rt/tlsf/addMemory - i32.const 1264 - global.set $~lib/rt/tlsf/ROOT - ) (func $~lib/rt/tlsf/searchBlock (param $0 i32) (result i32) (local $1 i32) (local $2 i32) @@ -816,9 +737,9 @@ local.set $1 local.get $2 local.get $1 - local.get $2 local.get $1 - i32.gt_s + local.get $2 + i32.lt_s select memory.grow i32.const 0 @@ -929,14 +850,87 @@ end local.get $1 ) - (func $while/Ref#constructor (result i32) + (func $~lib/rt/pure/__new (result i32) (local $0 i32) (local $1 i32) - (local $2 i32) global.get $~lib/rt/tlsf/ROOT i32.eqz if - call $~lib/rt/tlsf/initialize + memory.size + local.tee $1 + i32.const 1 + i32.lt_s + if (result i32) + i32.const 1 + local.get $1 + i32.sub + memory.grow + i32.const 0 + i32.lt_s + else + i32.const 0 + end + if + unreachable + end + i32.const 1264 + i32.const 0 + i32.store + i32.const 2832 + i32.const 0 + i32.store + loop $for-loop|0 + local.get $0 + i32.const 23 + i32.lt_u + if + local.get $0 + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=4 + i32.const 0 + local.set $1 + loop $for-loop|1 + local.get $1 + i32.const 16 + i32.lt_u + if + local.get $1 + local.get $0 + i32.const 4 + i32.shl + i32.add + i32.const 2 + i32.shl + i32.const 1264 + i32.add + i32.const 0 + i32.store offset=96 + local.get $1 + i32.const 1 + i32.add + local.set $1 + br $for-loop|1 + end + end + local.get $0 + i32.const 1 + i32.add + local.set $0 + br $for-loop|0 + end + end + i32.const 1264 + i32.const 2836 + memory.size + i32.const 16 + i32.shl + call $~lib/rt/tlsf/addMemory + i32.const 1264 + global.set $~lib/rt/tlsf/ROOT end global.get $~lib/rt/tlsf/ROOT call $~lib/rt/tlsf/allocateBlock @@ -960,7 +954,11 @@ local.get $1 i32.const 16 i32.add - local.tee $0 + ) + (func $~lib/rt/pure/__retain (param $0 i32) (result i32) + (local $1 i32) + (local $2 i32) + local.get $0 i32.const 1264 i32.gt_u if @@ -1021,7 +1019,6 @@ (local $0 i32) (local $1 i32) (local $2 i32) - (local $3 i32) i32.const 0 global.set $while/ran i32.const 10 @@ -1087,10 +1084,10 @@ local.set $0 local.get $1 if (result i32) - local.get $3 + local.get $2 i32.const 1 i32.add - local.tee $3 + local.tee $2 else i32.const 0 end @@ -1107,7 +1104,7 @@ call $~lib/builtins/abort unreachable end - local.get $3 + local.get $2 i32.const 1 i32.ne if @@ -1122,16 +1119,18 @@ global.set $while/ran i32.const 0 global.set $while/ran - loop $while-continue|01 - local.get $2 + i32.const 0 + local.set $0 + loop $while-continue|001 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 10 i32.ne - br_if $while-continue|01 + br_if $while-continue|001 end - local.get $2 + local.get $0 i32.const 10 i32.ne if @@ -1145,17 +1144,17 @@ i32.const 1 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|002 - local.get $2 + local.set $0 + loop $while-continue|01 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 10 i32.ne - br_if $while-continue|002 + br_if $while-continue|01 end - local.get $2 + local.get $0 i32.const 10 i32.ne if @@ -1181,18 +1180,18 @@ i32.const 0 global.set $while/ran i32.const 10 - local.set $2 - loop $while-continue|013 - local.get $2 + local.set $0 + loop $while-continue|02 + local.get $0 if - local.get $2 + local.get $0 i32.const 1 i32.sub - local.set $2 - br $while-continue|013 + local.set $0 + br $while-continue|02 end end - local.get $2 + local.get $0 if i32.const 0 i32.const 1056 @@ -1209,7 +1208,7 @@ local.set $0 i32.const 10 local.set $1 - loop $while-continue|04 + loop $while-continue|03 local.get $0 if loop $while-continue|1 @@ -1226,7 +1225,7 @@ i32.const 1 i32.sub local.set $0 - br $while-continue|04 + br $while-continue|03 end end local.get $0 @@ -1253,9 +1252,10 @@ global.set $while/ran i32.const 0 local.set $2 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $while-continue|05 + loop $while-continue|04 local.get $0 if local.get $2 @@ -1273,14 +1273,15 @@ call $~lib/rt/pure/__release end else - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $1 local.get $0 call $~lib/rt/pure/__release end local.get $1 local.set $0 - br $while-continue|05 + br $while-continue|04 end end local.get $2 @@ -1321,11 +1322,13 @@ global.set $while/ran i32.const 0 local.set $2 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.set $0 - loop $while-continue|06 + loop $while-continue|05 block $while-break|0 - call $while/Ref#constructor + call $~lib/rt/pure/__new + call $~lib/rt/pure/__retain local.tee $1 call $~lib/rt/pure/__release local.get $1 @@ -1346,7 +1349,7 @@ local.set $0 br $while-break|0 end - br $while-continue|06 + br $while-continue|05 end end end @@ -1387,30 +1390,30 @@ i32.const 0 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|02 - local.get $2 + local.set $0 + loop $while-continue|046 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 1 i32.lt_s - br_if $while-continue|02 + br_if $while-continue|046 end i32.const 1 global.set $while/ran i32.const 0 global.set $while/ran i32.const 0 - local.set $2 - loop $while-continue|03 - local.get $2 + local.set $0 + loop $while-continue|057 + local.get $0 i32.const 1 i32.add - local.tee $2 + local.tee $0 i32.const 1 i32.lt_s - br_if $while-continue|03 + br_if $while-continue|057 end i32.const 1 global.set $while/ran @@ -1492,8 +1495,7 @@ call $~lib/rt/tlsf/insertBlock else local.get $1 - i32.const 0 - i32.le_u + i32.eqz if i32.const 0 i32.const 1168